diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 66c9a6e0ff..0f119d3190 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -72,6 +72,8 @@ jobs:
BASE_BRANCH: ${{ github.base_ref }}
IONOS_USERNAME: ${{ secrets.IONOS_USERNAME }}
IONOS_PASSWORD: ${{ secrets.IONOS_PASSWORD }}
+ IONOS_S3_ACCESS_KEY: ${{ secrets.IONOS_S3_ACCESS_KEY }}
+ IONOS_S3_SECRET_KEY: ${{ secrets.IONOS_S3_SECRET_KEY }}
run: make test
if: matrix.os == 'ubuntu-latest'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 833bbee469..80a66791a9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,9 @@
# Changelog
-## [v6.9.10] – May 2026
+## [v6.10.1] – May 2026
### Added
+- Added `object-storage` support, with `whoami --provenance` credentials resolution
- Added `--ftp-port` on `image upload` which is usable in combination with `--ftp-url`.
- Improve `ionosctl shell` interactive shell prompt:
- Removed beta warnings and notes. Interactive prompts (e.g. delete confirmations) now work natively instead of requiring `--force`.
diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 0000000000..52ff7eb101
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,144 @@
+# CLAUDE.md
+
+## Git Workflow (MANDATORY)
+
+**Never work directly on `master` or ``.** Always create a feature branch and open a PR.
+
+```bash
+# Before starting any work:
+git checkout master && git pull # git checkout && git pull
+git checkout -b feat/ # or fix:/, doc:/, test:/, refactor:/
+
+# When done:
+git push -u origin feat/
+gh pr create --title "feat: " --body "..."
+```
+
+- **Never commit directly to `master` or ``** — all changes go through a PR reviewed and merged by a human.
+- Branch naming: `feat/`, `fix/`, `doc/`, `test/`, `refactor/`.
+- One logical change per branch. Keep PRs focused.
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## Overview
+
+`ionosctl` is a Go CLI tool for managing IONOS Cloud resources. It uses Cobra for the CLI framework, Viper for configuration, and multiple IONOS SDK packages for different services (Cloud API v6, DBaaS, DNS, CDN, VPN, Kafka, etc.).
+
+## Common Commands
+
+```bash
+make build # Build the binary (runs tools/build.sh build)
+make install # Install locally
+make utest # Run unit tests with coverage
+make itest # Run integration + unit tests (requires build tag: integration)
+make test # Full test suite: bats-core shell tests + go tests
+make lint # Run golangci-lint
+make gofmt_check # Check code formatting
+make gofmt # Format code
+make mocks # Regenerate mocks (uses golang/mock)
+make vendor # Update vendor dependencies
+```
+## Testing (MANDATORY)
+
+**YOU ARE NOT ALLOWED TO RUN TESTS WITHOUT MY EXPLICIT APPROVAL.**
+
+Run a single Go test:
+```bash
+go test ./commands/cloudapi-v6/... -run TestFunctionName -v
+go test ./internal/printer/... -run TestFunctionName -v
+```
+
+Run tests with integration tag:
+```bash
+go test -tags integration ./...
+```
+
+## Architecture
+
+### Layer Structure
+
+```
+main.go → commands/ → internal/core/ → services/ → IONOS SDKs
+ ↘ internal/printer/
+ ↘ internal/client/
+```
+
+1. **`commands/`** — Command definitions organized by service (`cloudapi-v6/`, `dns/`, `cdn/`, `dbaas/`, etc.)
+2. **`internal/core/`** — Command framework wrapping Cobra (`Command`, `CommandBuilder`, `CommandConfig`)
+3. **`services/cloudapi-v6/resources/`** — Service layer wrapping Cloud API v6 SDK calls
+4. **`internal/printer/jsontabwriter/`** — Output formatting (text tables, JSON, api-json)
+5. **`internal/client/`** — API client initialization, credentials, multi-SDK support
+6. **`internal/constants/`** — Flag name constants and shared strings
+
+### Command Structure Pattern
+
+Every command follows a **Namespace.Resource.Verb** hierarchy and is built with `core.CommandBuilder`:
+
+```go
+core.NewCommand(ctx, parentCmd, core.CommandBuilder{
+ Namespace: "datacenter",
+ Resource: "datacenter",
+ Verb: "list",
+ Aliases: []string{"l", "ls"},
+ ShortDesc: "List Data Centers",
+ PreCmdRun: core.NoPreRun, // validation (returns error to abort)
+ CmdRun: RunDataCenterList, // main logic
+ InitClient: true, // creates API client before CmdRun
+})
+```
+
+- **`PreCmdRun`** validates flags and preconditions; return an error to abort execution
+- **`CmdRun`** receives `*core.CommandConfig` which provides access to services, viper config, and the cobra command
+
+### Adding a New Command
+
+1. Create `commands/{service}/{resource}.go`
+2. Define a root function returning `*core.Command` (see `commands/cloudapi-v6/location.go` as a reference)
+3. Add subcommands via `core.NewCommand` with a `CommandBuilder`
+4. Implement `PreCmdRun` (validation) and `CmdRun` (logic) functions
+5. Use `jsontabwriter.GenerateOutput()` for output; define column headers with `tabheaders`
+6. Register in `commands/root.go` → `addCommands()` function
+
+### Flag Naming Convention
+
+Flag names are constants in `internal/constants/`. Access flag values in `CmdRun` via:
+```go
+viper.GetString(core.GetFlagName(c.NS, constants.FlagDatacenterId))
+```
+
+### Authentication & Configuration
+
+Credentials are loaded in priority order:
+1. Environment variables: `IONOS_USERNAME`, `IONOS_PASSWORD`, `IONOS_TOKEN`, `IONOS_API_URL`
+2. Config file: `~/.config/ionosctl/config.json` (Linux)
+
+### Output Formatting
+
+The `--output` global flag controls format: `text` (default table), `json`, or `api-json` (raw API response).
+The `--cols` flag controls which columns to display.
+The `--filters` flag supports case-insensitive key filtering.
+
+### Services (Cloud API v6)
+
+Services are lazy-loaded in `services/cloudapi-v6/services.go`:
+```go
+type Services struct {
+ Locations func() resources.LocationsService
+ DataCenters func() resources.DatacentersService
+ // ...
+}
+```
+
+Each resource service implements CRUD operations and is accessible via `c.CloudApiV6Services` in `CmdRun`.
+
+### Mocks
+
+Mocks for service interfaces are generated using `golang/mock`. Regenerate with `make mocks`. Mock files live alongside their interfaces, typically in `services/cloudapi-v6/resources/mocks/`.
+
+### Prerequisites
+- Remember to run make gofmt after implementing changes
+- Remember to run make docs after implementing changes
+- ionosctl uses bats for e2e tests, implement e2e tests for new features
+- Remember to run gofmt on the files to correctly import tests
+- Cyclomatic complexity for new functions should not exceed 15; refactor into smaller functions if necessary. Only for new code.
+- Add bats test if adding a new feature
diff --git a/commands/cfg/whoami.go b/commands/cfg/whoami.go
index b25796d84e..25d5e764fd 100644
--- a/commands/cfg/whoami.go
+++ b/commands/cfg/whoami.go
@@ -52,14 +52,14 @@ ionosctl cfg whoami --provenance`,
InitClient: false,
})
- cmd.AddBoolFlag(constants.FlagProvenance, constants.FlagProvenanceShort, false, "If set, the command prints the layers of authentication sources, their order of priority, and which one was used. It also tells you if a token or username and password are being used for authentication.")
+ cmd.AddBoolFlag(constants.FlagProvenance, constants.FlagProvenanceShort, false, "If set, the command prints the layers of authentication sources (including Object Storage credentials), their order of priority, and which one was used.")
return core.WithConfigOverride(cmd, []string{"auth"}, constants.DefaultApiURL+"/auth/v1")
}
// handleProvenance prints out all authentication layers in priority order,
// marks which one was actually used, and shows whether it’s token vs. user/pass
-// plus the effective API URL.
+// plus the effective API URL. It also shows Object Storage credential sources.
func handleProvenance(c *core.CommandConfig, cl *client.Client, authErr error) error {
var b strings.Builder
@@ -73,6 +73,28 @@ func handleProvenance(c *core.CommandConfig, cl *client.Client, authErr error) e
}
}
+ // Object Storage credential provenance
+ _, _, akSrc, skSrc, _ := client.ResolveObjectStorageCredentials()
+
+ b.WriteString("\nFor Object Storage, in order of priority:\n")
+
+ type osPair struct {
+ label string
+ akSrc client.ObjectStorageAccessKeySource
+ skSrc client.ObjectStorageSecretKeySource
+ }
+ pairs := []osPair{
+ {"environment variables: IONOS_S3_ACCESS_KEY, IONOS_S3_SECRET_KEY", client.ObjectStorageAccessKeyEnv, client.ObjectStorageSecretKeyEnv},
+ {"credentials from config file: s3AccessKey, s3SecretKey", client.ObjectStorageAccessKeyCfg, client.ObjectStorageSecretKeyCfg},
+ }
+ for i, p := range pairs {
+ if akSrc == p.akSrc && skSrc == p.skSrc {
+ b.WriteString(fmt.Sprintf("* [%d] %s (USED)\n", i+1, p.label))
+ } else {
+ b.WriteString(fmt.Sprintf(" [%d] %s\n", i+1, p.label))
+ }
+ }
+
// Finally, print it all out
_, err := fmt.Fprintln(c.Command.Command.OutOrStdout(), b.String())
if err != nil {
diff --git a/commands/object-storage/bucket/bucket.go b/commands/object-storage/bucket/bucket.go
new file mode 100644
index 0000000000..ba52494609
--- /dev/null
+++ b/commands/object-storage/bucket/bucket.go
@@ -0,0 +1,57 @@
+package bucket
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket/cors"
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket/encryption"
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket/lifecycle"
+ objectlock "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket/object-lock"
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket/policy"
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket/publicaccessblock"
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket/tagging"
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket/versioning"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+var allCols = []table.Column{
+ {Name: "Name", JSONPath: "Name", Default: true},
+ {Name: "CreationDate", JSONPath: "CreationDate", Default: true},
+ {Name: "Region", JSONPath: "Region", Default: true},
+}
+
+func BucketCommand() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "bucket",
+ Aliases: []string{"b"},
+ Short: "Bucket operations for contract-owned object storage",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(ListBucketsCmd())
+ cmd.AddCommand(CreateBucketCmd())
+ cmd.AddCommand(GetBucketCmd())
+ cmd.AddCommand(HeadBucketCmd())
+ cmd.AddCommand(DeleteBucketCmd())
+ cmd.AddCommand(versioning.Root())
+ cmd.AddCommand(objectlock.Root())
+ cmd.AddCommand(cors.CorsCmd())
+ cmd.AddCommand(encryption.EncryptionCmd())
+ cmd.AddCommand(tagging.TaggingCmd())
+ cmd.AddCommand(policy.PolicyCmd())
+ cmd.AddCommand(lifecycle.LifecycleCmd())
+ cmd.AddCommand(publicaccessblock.PublicAccessBlockCmd())
+ return cmd
+}
diff --git a/commands/object-storage/bucket/cors/cors.go b/commands/object-storage/bucket/cors/cors.go
new file mode 100644
index 0000000000..3ecdd0a0e0
--- /dev/null
+++ b/commands/object-storage/bucket/cors/cors.go
@@ -0,0 +1,51 @@
+package cors
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+var allCols = []table.Column{
+ {Name: "AllowedOrigins", JSONPath: "AllowedOrigins", Default: true},
+ {Name: "AllowedMethods", JSONPath: "AllowedMethods", Default: true},
+ {Name: "AllowedHeaders", JSONPath: "AllowedHeaders", Default: true},
+ {Name: "ExposeHeaders", JSONPath: "ExposeHeaders"},
+ {Name: "MaxAgeSeconds", JSONPath: "MaxAgeSeconds"},
+ {Name: "ID", JSONPath: "ID"},
+}
+
+type corsRuleInfo struct {
+ AllowedOrigins string `json:"AllowedOrigins"`
+ AllowedMethods string `json:"AllowedMethods"`
+ AllowedHeaders string `json:"AllowedHeaders"`
+ ExposeHeaders string `json:"ExposeHeaders"`
+ MaxAgeSeconds string `json:"MaxAgeSeconds"`
+ ID string `json:"ID"`
+}
+
+func CorsCmd() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "cors",
+ Short: "Bucket CORS operations for contract-owned object storage",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+ cmd.AddCommand(DeleteCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/bucket/cors/delete.go b/commands/object-storage/bucket/cors/delete.go
new file mode 100644
index 0000000000..07be30204b
--- /dev/null
+++ b/commands/object-storage/bucket/cors/delete.go
@@ -0,0 +1,51 @@
+package cors
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+)
+
+func DeleteCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "cors",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete the CORS configuration for a bucket",
+ Example: "ionosctl object-storage bucket cors delete --name my-bucket\nionosctl object-storage bucket cors delete --name my-bucket -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete CORS configuration for bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.CORSApi.DeleteBucketCors(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "CORS configuration for %q deleted successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/cors/get.go b/commands/object-storage/bucket/cors/get.go
new file mode 100644
index 0000000000..93711714cb
--- /dev/null
+++ b/commands/object-storage/bucket/cors/get.go
@@ -0,0 +1,68 @@
+package cors
+
+import (
+ "context"
+ "strconv"
+ "strings"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "cors",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the CORS configuration for a bucket",
+ Example: "ionosctl object-storage bucket cors get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.CORSApi.GetBucketCors(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ var rules []corsRuleInfo
+ for _, r := range result.GetCORSRules() {
+ info := corsRuleInfo{
+ AllowedOrigins: strings.Join(r.GetAllowedOrigins(), ", "),
+ AllowedMethods: strings.Join(r.GetAllowedMethods(), ", "),
+ AllowedHeaders: strings.Join(r.GetAllowedHeaders(), ", "),
+ ExposeHeaders: strings.Join(r.GetExposeHeaders(), ", "),
+ }
+
+ if r.HasMaxAgeSeconds() {
+ info.MaxAgeSeconds = strconv.FormatInt(int64(r.GetMaxAgeSeconds()), 10)
+ }
+
+ if r.HasID() {
+ info.ID = strconv.FormatInt(int64(r.GetID()), 10)
+ }
+
+ rules = append(rules, info)
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, rules, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/cors/put.go b/commands/object-storage/bucket/cors/put.go
new file mode 100644
index 0000000000..0ed7f5a20c
--- /dev/null
+++ b/commands/object-storage/bucket/cors/put.go
@@ -0,0 +1,88 @@
+package cors
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "os"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+const corsExample = `{
+ "CORSRules": [
+ {
+ "AllowedOrigins": ["http://www.example.com"],
+ "AllowedMethods": ["GET", "PUT", "POST"],
+ "AllowedHeaders": ["*"],
+ "ExposeHeaders": ["x-amz-request-id"],
+ "MaxAgeSeconds": 3600
+ }
+ ]
+}`
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "cors",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Create or replace the CORS configuration for a bucket",
+ LongDesc: "Create or replace the CORS configuration for a bucket. " +
+ "The configuration must be provided as a path to a JSON file via --json-properties. " +
+ "Use --json-properties-example to see an example CORS configuration.",
+ Example: "ionosctl object-storage bucket cors put --name my-bucket --json-properties cors.json\n" +
+ "ionosctl object-storage bucket cors put --json-properties-example",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ return nil
+ }
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, constants.FlagJsonProperties)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ fmt.Fprintln(c.Command.Command.OutOrStdout(), corsExample)
+ return nil
+ }
+
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ input := viper.GetString(core.GetFlagName(c.NS, constants.FlagJsonProperties))
+
+ data, err := os.ReadFile(input)
+ if err != nil {
+ return fmt.Errorf("reading CORS input: %w", err)
+ }
+
+ var corsReq objectstorage.PutBucketCorsRequest
+ if err := json.Unmarshal(data, &corsReq); err != nil {
+ return fmt.Errorf("parsing CORS JSON: %w", err)
+ }
+
+ _, err = client.MustObjectStorage().ObjectStorageClient.CORSApi.PutBucketCors(c.Context, name).
+ PutBucketCorsRequest(corsReq).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "CORS configuration for %q applied successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(constants.FlagJsonProperties, "", "", "Path to a JSON file containing the CORS configuration")
+ cmd.AddBoolFlag(constants.FlagJsonPropertiesExample, "", false, "Print an example CORS configuration JSON and exit")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/create.go b/commands/object-storage/bucket/create.go
new file mode 100644
index 0000000000..9056c33b47
--- /dev/null
+++ b/commands/object-storage/bucket/create.go
@@ -0,0 +1,60 @@
+package bucket
+
+import (
+ "context"
+
+ "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+const flagObjectLock = "object-lock"
+
+func CreateBucketCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "bucket",
+ Verb: "create",
+ Aliases: []string{"c"},
+ ShortDesc: "Create a contract-owned bucket",
+ Example: "ionosctl object-storage bucket create --name my-bucket\nionosctl object-storage bucket create --name my-bucket --location eu-central-3\nionosctl object-storage bucket create --name my-bucket --object-lock",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ location := viper.GetString(constants.FlagLocation)
+ objectLock := viper.GetBool(core.GetFlagName(c.NS, flagObjectLock))
+
+ cfg := objectstorage.NewCreateBucketConfiguration()
+ cfg.SetLocationConstraint(location)
+
+ req := client.MustObjectStorage().ObjectStorageClient.BucketsApi.CreateBucket(c.Context, name).
+ CreateBucketConfiguration(*cfg).XAmzBucketObjectLockEnabled(objectLock)
+ _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ info, err := getBucketInfo(c.Context, name)
+ if err != nil {
+ return err
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, info, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket to create", core.RequiredFlagOption())
+ cmd.AddBoolFlag(flagObjectLock, "", false, "Enable Object Lock on the new bucket (cannot be changed after creation)")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/delete.go b/commands/object-storage/bucket/delete.go
new file mode 100644
index 0000000000..7e37ffd133
--- /dev/null
+++ b/commands/object-storage/bucket/delete.go
@@ -0,0 +1,114 @@
+package bucket
+
+import (
+ "context"
+ "fmt"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/functional"
+)
+
+func DeleteBucketCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "bucket",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete a contract-owned bucket",
+ LongDesc: "Delete a contract-owned bucket, or all buckets using --all. The bucket must be empty before deletion. Use 'ionosctl object-storage object delete --all' to empty a bucket first.",
+ Example: "ionosctl object-storage bucket delete --name my-bucket\nionosctl object-storage bucket delete --all\nionosctl object-storage bucket delete --all -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlagsSets(c.Command, c.NS,
+ []string{constants.ArgAll},
+ []string{constants.FlagName},
+ )
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.ArgAll)) {
+ return deleteAllBuckets(c)
+ }
+
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.BucketsApi.DeleteBucket(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Bucket %q deleted successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket to delete",
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddBoolFlag(constants.ArgAll, constants.ArgAllShort, false, "Delete all buckets")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
+
+func deleteAllBuckets(c *core.CommandConfig) error {
+ s3 := client.MustObjectStorage().ObjectStorageClient
+
+ result, _, err := s3.BucketsApi.ListBuckets(c.Context).Execute()
+ if err != nil {
+ return fmt.Errorf("failed listing buckets: %w", err)
+ }
+
+ buckets := result.GetBuckets()
+
+ if viper.IsSet(constants.FlagLocation) {
+ filterRegion := viper.GetString(constants.FlagLocation)
+ filtered, locErr := filterBucketsByLocation(c.Context, s3, buckets, filterRegion)
+ if locErr != nil {
+ return locErr
+ }
+ buckets = filtered
+ }
+
+ return functional.ApplyAndAggregateErrors(buckets, func(b objectstorage.Bucket) error {
+ name := b.GetName()
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return nil
+ }
+
+ _, delErr := s3.BucketsApi.DeleteBucket(c.Context, name).Execute()
+ if delErr != nil {
+ return fmt.Errorf("failed deleting bucket %q: %w", name, delErr)
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Bucket %q deleted successfully\n", name)
+ return nil
+ })
+}
+
+// filterBucketsByLocation filters buckets by region, returning an error if any
+// location lookup fails (to avoid silently skipping buckets from deletion).
+func filterBucketsByLocation(ctx context.Context, s3 *objectstorage.APIClient, buckets []objectstorage.Bucket, region string) ([]objectstorage.Bucket, error) {
+ var filtered []objectstorage.Bucket
+ for _, b := range buckets {
+ loc, _, locErr := s3.BucketsApi.GetBucketLocation(ctx, b.GetName()).Execute()
+ if locErr != nil {
+ return nil, fmt.Errorf("cannot filter by location: failed to get location for bucket %q: %w", b.GetName(), locErr)
+ }
+ if loc.GetLocationConstraint() == region {
+ filtered = append(filtered, b)
+ }
+ }
+ return filtered, nil
+}
diff --git a/commands/object-storage/bucket/encryption/delete.go b/commands/object-storage/bucket/encryption/delete.go
new file mode 100644
index 0000000000..109592a155
--- /dev/null
+++ b/commands/object-storage/bucket/encryption/delete.go
@@ -0,0 +1,51 @@
+package encryption
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+)
+
+func DeleteCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "encryption",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete the default encryption configuration for a bucket",
+ Example: "ionosctl object-storage bucket encryption delete --name my-bucket\nionosctl object-storage bucket encryption delete --name my-bucket -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete encryption configuration for bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.EncryptionApi.DeleteBucketEncryption(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Encryption configuration for %q deleted successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/encryption/encryption.go b/commands/object-storage/bucket/encryption/encryption.go
new file mode 100644
index 0000000000..3d17d6da79
--- /dev/null
+++ b/commands/object-storage/bucket/encryption/encryption.go
@@ -0,0 +1,42 @@
+package encryption
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+var allCols = []table.Column{
+ {Name: "SSEAlgorithm", JSONPath: "SSEAlgorithm", Default: true},
+}
+
+type encryptionRuleInfo struct {
+ SSEAlgorithm string `json:"SSEAlgorithm"`
+}
+
+func EncryptionCmd() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "encryption",
+ Aliases: []string{"enc"},
+ Short: "Bucket encryption operations for contract-owned object storage",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+ cmd.AddCommand(DeleteCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/bucket/encryption/get.go b/commands/object-storage/bucket/encryption/get.go
new file mode 100644
index 0000000000..708c0f2318
--- /dev/null
+++ b/commands/object-storage/bucket/encryption/get.go
@@ -0,0 +1,56 @@
+package encryption
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "encryption",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the default encryption configuration for a bucket",
+ Example: "ionosctl object-storage bucket encryption get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.EncryptionApi.GetBucketEncryption(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ var rules []encryptionRuleInfo
+ for _, r := range result.GetRules() {
+ if r.HasApplyServerSideEncryptionByDefault() {
+ def := r.GetApplyServerSideEncryptionByDefault()
+ rules = append(rules, encryptionRuleInfo{
+ SSEAlgorithm: string(def.GetSSEAlgorithm()),
+ })
+ }
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, rules, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/encryption/put.go b/commands/object-storage/bucket/encryption/put.go
new file mode 100644
index 0000000000..18f8e72519
--- /dev/null
+++ b/commands/object-storage/bucket/encryption/put.go
@@ -0,0 +1,86 @@
+package encryption
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "os"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+const encryptionExample = `{
+ "Rules": [
+ {
+ "ApplyServerSideEncryptionByDefault": {
+ "SSEAlgorithm": "AES256"
+ }
+ }
+ ]
+}`
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "encryption",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Create or replace the default encryption configuration for a bucket",
+ LongDesc: "Create or replace the default encryption configuration for a bucket. " +
+ "The configuration must be provided as a path to a JSON file via --json-properties. " +
+ "Use --json-properties-example to see an example encryption configuration.",
+ Example: "ionosctl object-storage bucket encryption put --name my-bucket --json-properties encryption.json\n" +
+ "ionosctl object-storage bucket encryption put --json-properties-example",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ return nil
+ }
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, constants.FlagJsonProperties)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ fmt.Fprintln(c.Command.Command.OutOrStdout(), encryptionExample)
+ return nil
+ }
+
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ input := viper.GetString(core.GetFlagName(c.NS, constants.FlagJsonProperties))
+
+ data, err := os.ReadFile(input)
+ if err != nil {
+ return fmt.Errorf("reading encryption input: %w", err)
+ }
+
+ var encReq objectstorage.PutBucketEncryptionRequest
+ if err := json.Unmarshal(data, &encReq); err != nil {
+ return fmt.Errorf("parsing encryption JSON: %w", err)
+ }
+
+ _, err = client.MustObjectStorage().ObjectStorageClient.EncryptionApi.PutBucketEncryption(c.Context, name).
+ PutBucketEncryptionRequest(encReq).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Encryption configuration for %q applied successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(constants.FlagJsonProperties, "", "", "Path to a JSON file containing the encryption configuration")
+ cmd.AddBoolFlag(constants.FlagJsonPropertiesExample, "", false, "Print an example encryption configuration JSON and exit")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/get.go b/commands/object-storage/bucket/get.go
new file mode 100644
index 0000000000..c66c653720
--- /dev/null
+++ b/commands/object-storage/bucket/get.go
@@ -0,0 +1,90 @@
+package bucket
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+type bucketInfo struct {
+ Name string `json:"Name"`
+ CreationDate time.Time `json:"CreationDate"`
+ Region string `json:"Region"`
+}
+
+// getBucketInfo fetches metadata for a single bucket by name.
+// S3 has no single-bucket GET endpoint; ListBuckets is the only way to retrieve creation date.
+func getBucketInfo(ctx context.Context, name string) (*bucketInfo, error) {
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.BucketsApi.ListBuckets(ctx).Execute()
+ if err != nil {
+ return nil, err
+ }
+
+ var found *bucketInfo
+ for _, b := range result.GetBuckets() {
+ if b.GetName() == name {
+ found = &bucketInfo{
+ Name: b.GetName(),
+ CreationDate: b.GetCreationDate(),
+ }
+ break
+ }
+ }
+ if found == nil {
+ return nil, fmt.Errorf("bucket %q not found", name)
+ }
+
+ loc, apiResp, locErr := client.MustObjectStorage().ObjectStorageClient.BucketsApi.GetBucketLocation(ctx, name).Execute()
+ if locErr != nil {
+ if apiResp != nil {
+ found.Region = fmt.Sprintf("<%s>", apiResp.Status)
+ } else {
+ found.Region = ""
+ }
+ } else {
+ found.Region = loc.GetLocationConstraint()
+ }
+
+ return found, nil
+}
+
+func GetBucketCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "bucket",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get details of a contract-owned bucket",
+ Example: "ionosctl object-storage bucket get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ found, err := getBucketInfo(c.Context, name)
+ if err != nil {
+ return err
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, found, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket to retrieve", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/head.go b/commands/object-storage/bucket/head.go
new file mode 100644
index 0000000000..d59a7473ba
--- /dev/null
+++ b/commands/object-storage/bucket/head.go
@@ -0,0 +1,72 @@
+package bucket
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+var headCols = []table.Column{
+ {Name: "Name", JSONPath: "Name", Default: true},
+ {Name: "Status", JSONPath: "Status", Default: true},
+ {Name: "Region", JSONPath: "Region", Default: true},
+}
+
+type headResult struct {
+ Name string `json:"Name"`
+ Status string `json:"Status"`
+ Region string `json:"Region"`
+}
+
+func HeadBucketCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "bucket",
+ Verb: "head",
+ Aliases: []string{"hd"},
+ ShortDesc: "Check if a bucket exists and you have access",
+ Example: "ionosctl object-storage bucket head --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.BucketsApi.HeadBucket(c.Context, name).Execute()
+ if err != nil {
+ return fmt.Errorf("checking if bucket %q exists: %w", name, err)
+ }
+
+ result := headResult{
+ Name: name,
+ Status: "exists and is accessible",
+ Region: viper.GetString(constants.FlagLocation),
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(headCols, result, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket to check", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.Flags().StringSlice(constants.ArgCols, nil, table.ColsMessage(headCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(headCols), cobra.ShellCompDirectiveNoFileComp
+ })
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/lifecycle/delete.go b/commands/object-storage/bucket/lifecycle/delete.go
new file mode 100644
index 0000000000..00aa41fc62
--- /dev/null
+++ b/commands/object-storage/bucket/lifecycle/delete.go
@@ -0,0 +1,51 @@
+package lifecycle
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+)
+
+func DeleteCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "lifecycle",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete the lifecycle configuration for a bucket",
+ Example: "ionosctl object-storage bucket lifecycle delete --name my-bucket\nionosctl object-storage bucket lifecycle delete --name my-bucket -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete lifecycle configuration for bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.LifecycleApi.DeleteBucketLifecycle(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Lifecycle configuration for %q deleted successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/lifecycle/get.go b/commands/object-storage/bucket/lifecycle/get.go
new file mode 100644
index 0000000000..1b35060c98
--- /dev/null
+++ b/commands/object-storage/bucket/lifecycle/get.go
@@ -0,0 +1,78 @@
+package lifecycle
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "lifecycle",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the lifecycle configuration for a bucket",
+ Example: "ionosctl object-storage bucket lifecycle get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.LifecycleApi.GetBucketLifecycle(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ var rules []ruleInfo
+ for _, r := range result.GetRules() {
+ info := ruleInfo{
+ ID: r.GetID(),
+ Prefix: r.GetPrefix(),
+ Status: string(r.GetStatus()),
+ }
+
+ if exp := r.Expiration; exp != nil {
+ info.ExpirationDays = int32PtrToStr(exp.Days)
+ info.ExpirationDate = derefStr(exp.Date)
+ info.ExpiredObjectDeleteMarker = boolPtrToStr(exp.ExpiredObjectDeleteMarker)
+ }
+
+ if nve := r.NoncurrentVersionExpiration; nve != nil {
+ info.NoncurrentDays = int32PtrToStr(nve.NoncurrentDays)
+ }
+
+ if abort := r.AbortIncompleteMultipartUpload; abort != nil {
+ info.AbortDays = int32PtrToStr(abort.DaysAfterInitiation)
+ }
+
+ rules = append(rules, info)
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, rules, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
+
+func derefStr(s *string) string {
+ if s == nil {
+ return ""
+ }
+ return *s
+}
diff --git a/commands/object-storage/bucket/lifecycle/lifecycle.go b/commands/object-storage/bucket/lifecycle/lifecycle.go
new file mode 100644
index 0000000000..50bd15f856
--- /dev/null
+++ b/commands/object-storage/bucket/lifecycle/lifecycle.go
@@ -0,0 +1,72 @@
+package lifecycle
+
+import (
+ "fmt"
+
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+var allCols = []table.Column{
+ {Name: "ID", JSONPath: "ID", Default: true},
+ {Name: "Prefix", JSONPath: "Prefix", Default: true},
+ {Name: "Status", JSONPath: "Status", Default: true},
+ {Name: "ExpirationDays", JSONPath: "ExpirationDays", Default: true},
+ {Name: "ExpirationDate", JSONPath: "ExpirationDate"},
+ {Name: "ExpiredObjectDeleteMarker", JSONPath: "ExpiredObjectDeleteMarker"},
+ {Name: "NoncurrentDays", JSONPath: "NoncurrentDays"},
+ {Name: "AbortDays", JSONPath: "AbortDays"},
+}
+
+type ruleInfo struct {
+ ID string `json:"ID"`
+ Prefix string `json:"Prefix"`
+ Status string `json:"Status"`
+ ExpirationDays string `json:"ExpirationDays"`
+ ExpirationDate string `json:"ExpirationDate"`
+ ExpiredObjectDeleteMarker string `json:"ExpiredObjectDeleteMarker"`
+ NoncurrentDays string `json:"NoncurrentDays"`
+ AbortDays string `json:"AbortDays"`
+}
+
+func int32PtrToStr(v *int32) string {
+ if v == nil {
+ return ""
+ }
+ return fmt.Sprintf("%d", *v)
+}
+
+func boolPtrToStr(v *bool) string {
+ if v == nil {
+ return ""
+ }
+ return fmt.Sprintf("%t", *v)
+}
+
+func LifecycleCmd() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "lifecycle",
+ Aliases: []string{"lc"},
+ Short: "Bucket lifecycle operations for contract-owned object storage",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+ cmd.AddCommand(DeleteCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/bucket/lifecycle/put.go b/commands/object-storage/bucket/lifecycle/put.go
new file mode 100644
index 0000000000..5598c74deb
--- /dev/null
+++ b/commands/object-storage/bucket/lifecycle/put.go
@@ -0,0 +1,108 @@
+package lifecycle
+
+import (
+ "context"
+ "crypto/md5"
+ "encoding/base64"
+ "encoding/json"
+ "encoding/xml"
+ "fmt"
+ "os"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+const lifecycleExample = `{
+ "Rules": [
+ {
+ "ID": "expire-old-logs",
+ "Prefix": "logs/",
+ "Status": "Enabled",
+ "Expiration": {
+ "Days": 90
+ }
+ },
+ {
+ "ID": "cleanup-incomplete-uploads",
+ "Prefix": "",
+ "Status": "Enabled",
+ "AbortIncompleteMultipartUpload": {
+ "DaysAfterInitiation": 7
+ }
+ }
+ ]
+}`
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "lifecycle",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Create or replace the lifecycle configuration for a bucket",
+ LongDesc: "Create or replace the lifecycle configuration for a bucket. " +
+ "The configuration must be provided as a path to a JSON file via --json-properties. " +
+ "Use --json-properties-example to see an example lifecycle configuration.",
+ Example: "ionosctl object-storage bucket lifecycle put --name my-bucket --json-properties lifecycle.json\n" +
+ "ionosctl object-storage bucket lifecycle put --json-properties-example",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ return nil
+ }
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, constants.FlagJsonProperties)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ fmt.Fprintln(c.Command.Command.OutOrStdout(), lifecycleExample)
+ return nil
+ }
+
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ input := viper.GetString(core.GetFlagName(c.NS, constants.FlagJsonProperties))
+
+ data, err := os.ReadFile(input)
+ if err != nil {
+ return fmt.Errorf("reading lifecycle input: %w", err)
+ }
+
+ var req objectstorage.PutBucketLifecycleRequest
+ if err := json.Unmarshal(data, &req); err != nil {
+ return fmt.Errorf("parsing lifecycle JSON: %w", err)
+ }
+
+ xmlBytes, err := xml.Marshal(req)
+ if err != nil {
+ return fmt.Errorf("serializing lifecycle configuration: %w", err)
+ }
+ hash := md5.Sum(xmlBytes)
+ contentMD5 := base64.StdEncoding.EncodeToString(hash[:])
+
+ _, err = client.MustObjectStorage().ObjectStorageClient.LifecycleApi.PutBucketLifecycle(c.Context, name).
+ ContentMD5(contentMD5).
+ PutBucketLifecycleRequest(req).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Lifecycle configuration for %q applied successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(constants.FlagJsonProperties, "", "", "Path to a JSON file containing the lifecycle configuration")
+ cmd.AddBoolFlag(constants.FlagJsonPropertiesExample, "", false, "Print an example lifecycle configuration JSON and exit")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/list.go b/commands/object-storage/bucket/list.go
new file mode 100644
index 0000000000..0652f76412
--- /dev/null
+++ b/commands/object-storage/bucket/list.go
@@ -0,0 +1,78 @@
+package bucket
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func ListBucketsCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "bucket",
+ Verb: "list",
+ Aliases: []string{"ls"},
+ ShortDesc: "List all contract-owned buckets",
+ Example: "ionosctl object-storage bucket list\nionosctl object-storage bucket list --location eu-central-3",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return nil
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.BucketsApi.ListBuckets(c.Context).Execute()
+ if err != nil {
+ return err
+ }
+
+ filterByLocation := viper.IsSet(constants.FlagLocation)
+ filterRegion := viper.GetString(constants.FlagLocation)
+
+ var buckets []bucketInfo
+ for _, b := range result.GetBuckets() {
+
+ bi := bucketInfo{
+ Name: b.GetName(),
+ CreationDate: b.GetCreationDate(),
+ }
+
+ loc, apiResp, locErr := client.MustObjectStorage().ObjectStorageClient.BucketsApi.GetBucketLocation(c.Context, b.GetName()).Execute()
+ if locErr != nil {
+ // When filtering by location, a failed lookup would silently
+ // exclude the bucket. Fail loudly so the user knows results
+ // may be incomplete.
+ if filterByLocation {
+ return fmt.Errorf("cannot filter by location: failed to get location for bucket %q: %w", b.GetName(), locErr)
+ }
+
+ c.Verbose("failed to get location for bucket %q: %v", b.GetName(), locErr)
+ if apiResp != nil {
+ bi.Region = fmt.Sprintf("<%s>", apiResp.Status)
+ } else {
+ bi.Region = ""
+ }
+ } else {
+ bi.Region = loc.GetLocationConstraint()
+ }
+
+ if filterByLocation && bi.Region != filterRegion {
+ continue
+ }
+
+ buckets = append(buckets, bi)
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, buckets, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/object-lock/get.go b/commands/object-storage/bucket/object-lock/get.go
new file mode 100644
index 0000000000..6f7139cb85
--- /dev/null
+++ b/commands/object-storage/bucket/object-lock/get.go
@@ -0,0 +1,63 @@
+package objectlock
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-lock",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the Object Lock configuration for a bucket",
+ Example: "ionosctl object-storage bucket object-lock get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.ObjectLockApi.GetObjectLockConfiguration(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ info := configInfo{
+ ObjectLockEnabled: result.GetObjectLockEnabled(),
+ }
+
+ if result.HasRule() {
+ rule := result.GetRule()
+ retention := rule.GetDefaultRetention()
+ info.RetentionMode = retention.GetMode()
+ if retention.HasDays() {
+ info.RetentionDays = strconv.FormatInt(int64(retention.GetDays()), 10)
+ }
+ if retention.HasYears() {
+ info.RetentionYears = strconv.FormatInt(int64(retention.GetYears()), 10)
+ }
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, info, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/object-lock/object_lock.go b/commands/object-storage/bucket/object-lock/object_lock.go
new file mode 100644
index 0000000000..1f8590a065
--- /dev/null
+++ b/commands/object-storage/bucket/object-lock/object_lock.go
@@ -0,0 +1,53 @@
+package objectlock
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+const (
+ flagMode = "mode"
+ flagDays = "days"
+ flagYears = "years"
+)
+
+var allCols = []table.Column{
+ {Name: "ObjectLockEnabled", JSONPath: "ObjectLockEnabled", Default: true},
+ {Name: "RetentionMode", JSONPath: "RetentionMode", Default: true},
+ {Name: "RetentionDays", JSONPath: "RetentionDays", Default: true},
+ {Name: "RetentionYears", JSONPath: "RetentionYears"},
+}
+
+type configInfo struct {
+ ObjectLockEnabled string `json:"ObjectLockEnabled"`
+ RetentionMode string `json:"RetentionMode"`
+ RetentionDays string `json:"RetentionDays"`
+ RetentionYears string `json:"RetentionYears"`
+}
+
+func Root() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "object-lock",
+ Aliases: []string{"ol"},
+ Short: "Manage bucket Object Lock configuration",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/bucket/object-lock/put.go b/commands/object-storage/bucket/object-lock/put.go
new file mode 100644
index 0000000000..88f8d9e402
--- /dev/null
+++ b/commands/object-storage/bucket/object-lock/put.go
@@ -0,0 +1,106 @@
+package objectlock
+
+import (
+ "context"
+ "crypto/md5"
+ "encoding/base64"
+ "encoding/xml"
+ "fmt"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-lock",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Apply an Object Lock configuration to a bucket",
+ LongDesc: "Apply an Object Lock configuration to a bucket. " +
+ "The bucket must have been created with --object-lock enabled. " +
+ "Specify a default retention mode (GOVERNANCE or COMPLIANCE) and period (--days or --years, but not both).",
+ Example: "ionosctl object-storage bucket object-lock put --name my-bucket --mode GOVERNANCE --days 30\n" +
+ "ionosctl object-storage bucket object-lock put --name my-bucket --mode COMPLIANCE --years 1",
+ PreCmdRun: validateObjectLockFlags,
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ mode := viper.GetString(core.GetFlagName(c.NS, flagMode))
+ days := viper.GetInt32(core.GetFlagName(c.NS, flagDays))
+ years := viper.GetInt32(core.GetFlagName(c.NS, flagYears))
+
+ retention := objectstorage.NewDefaultRetention()
+ retention.SetMode(mode)
+ if days > 0 {
+ retention.SetDays(days)
+ }
+ if years > 0 {
+ retention.SetYears(years)
+ }
+
+ rule := objectstorage.NewPutObjectLockConfigurationRequestRule()
+ rule.SetDefaultRetention(*retention)
+
+ req := objectstorage.NewPutObjectLockConfigurationRequest()
+ req.SetObjectLockEnabled("Enabled")
+ req.SetRule(*rule)
+
+ xmlBytes, err := xml.Marshal(req)
+ if err != nil {
+ return fmt.Errorf("serializing object lock configuration: %w", err)
+ }
+ hash := md5.Sum(xmlBytes)
+ contentMD5 := base64.StdEncoding.EncodeToString(hash[:])
+
+ _, err = client.MustObjectStorage().ObjectStorageClient.ObjectLockApi.
+ PutObjectLockConfiguration(c.Context, name).
+ ContentMD5(contentMD5).
+ PutObjectLockConfigurationRequest(*req).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Object Lock configuration for %q applied successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagMode, "", "", "Default retention mode: GOVERNANCE or COMPLIANCE", core.RequiredFlagOption())
+ _ = cmd.Command.RegisterFlagCompletionFunc(flagMode, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return []string{"GOVERNANCE", "COMPLIANCE"}, cobra.ShellCompDirectiveNoFileComp
+ })
+ cmd.AddInt32Flag(flagDays, "", 0, "Default retention period in days (mutually exclusive with --years)")
+ cmd.AddInt32Flag(flagYears, "", 0, "Default retention period in years (mutually exclusive with --days)")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
+
+func validateObjectLockFlags(c *core.PreCommandConfig) error {
+ if err := core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagMode); err != nil {
+ return err
+ }
+
+ days := viper.GetInt32(core.GetFlagName(c.NS, flagDays))
+ years := viper.GetInt32(core.GetFlagName(c.NS, flagYears))
+ if days == 0 && years == 0 {
+ return fmt.Errorf("at least one of --%s or --%s must be provided", flagDays, flagYears)
+ }
+ if days != 0 && years != 0 {
+ return fmt.Errorf("--%s and --%s are mutually exclusive", flagDays, flagYears)
+ }
+
+ return nil
+}
diff --git a/commands/object-storage/bucket/policy/delete.go b/commands/object-storage/bucket/policy/delete.go
new file mode 100644
index 0000000000..7fb348eed9
--- /dev/null
+++ b/commands/object-storage/bucket/policy/delete.go
@@ -0,0 +1,51 @@
+package policy
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+)
+
+func DeleteCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "policy",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete the bucket policy",
+ Example: "ionosctl object-storage bucket policy delete --name my-bucket\nionosctl object-storage bucket policy delete --name my-bucket -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete policy for bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.PolicyApi.DeleteBucketPolicy(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Bucket policy for %q deleted successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/policy/get.go b/commands/object-storage/bucket/policy/get.go
new file mode 100644
index 0000000000..7797a49a03
--- /dev/null
+++ b/commands/object-storage/bucket/policy/get.go
@@ -0,0 +1,82 @@
+package policy
+
+import (
+ "context"
+ "encoding/json"
+ "strings"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+type statementInfo struct {
+ Sid string `json:"Sid"`
+ Effect string `json:"Effect"`
+ Action string `json:"Action"`
+ Resource string `json:"Resource"`
+ Principal string `json:"Principal"`
+ Condition string `json:"Condition"`
+}
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "policy",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the bucket policy",
+ Example: "ionosctl object-storage bucket policy get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.PolicyApi.GetBucketPolicy(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ var statements []statementInfo
+ for _, s := range result.GetStatement() {
+ si := statementInfo{
+ Sid: s.GetSid(),
+ Effect: s.GetEffect(),
+ Action: strings.Join(s.GetAction(), ", "),
+ }
+
+ si.Resource = strings.Join(s.GetResource(), ", ")
+
+ if s.HasPrincipal() {
+ p := s.GetPrincipal()
+ si.Principal = strings.Join(p.GetAWS(), ", ")
+ }
+
+ if s.HasCondition() {
+ b, err := json.Marshal(s.GetCondition())
+ if err == nil {
+ si.Condition = string(b)
+ }
+ }
+
+ statements = append(statements, si)
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, statements, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/policy/policy.go b/commands/object-storage/bucket/policy/policy.go
new file mode 100644
index 0000000000..d7f69f02a9
--- /dev/null
+++ b/commands/object-storage/bucket/policy/policy.go
@@ -0,0 +1,49 @@
+package policy
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+var allCols = []table.Column{
+ {Name: "Sid", JSONPath: "Sid", Default: true},
+ {Name: "Effect", JSONPath: "Effect", Default: true},
+ {Name: "Action", JSONPath: "Action", Default: true},
+ {Name: "Resource", JSONPath: "Resource", Default: true},
+ {Name: "Principal", JSONPath: "Principal", Default: true},
+ {Name: "Condition", JSONPath: "Condition"},
+}
+
+var statusCols = []table.Column{
+ {Name: "Bucket", JSONPath: "Bucket", Default: true},
+ {Name: "IsPublic", JSONPath: "IsPublic", Default: true},
+}
+
+func PolicyCmd() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "policy",
+ Aliases: []string{"pol"},
+ Short: "Bucket policy operations for contract-owned object storage",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+ cmd.AddCommand(DeleteCmd())
+ cmd.AddCommand(StatusCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/bucket/policy/put.go b/commands/object-storage/bucket/policy/put.go
new file mode 100644
index 0000000000..db41908767
--- /dev/null
+++ b/commands/object-storage/bucket/policy/put.go
@@ -0,0 +1,99 @@
+package policy
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "os"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+// policyExample uses S3-compatible IAM policy syntax. The "s3:" action prefix
+// and "arn:aws:s3:::" resource format are required by the S3-compatible API,
+// not references to AWS services.
+const policyExample = `{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Sid": "PublicReadGetObject",
+ "Effect": "Allow",
+ "Principal": {
+ "AWS": ["*"]
+ },
+ "Action": ["s3:GetObject"],
+ "Resource": ["arn:aws:s3:::BUCKET_NAME/*"]
+ }
+ ]
+}`
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "policy",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Create or replace the bucket policy",
+ LongDesc: "Create or replace the bucket policy. " +
+ "The policy must be provided as a path to a JSON file via --json-properties. " +
+ "Use --json-properties-example to see an example policy.",
+ Example: "ionosctl object-storage bucket policy put --name my-bucket --json-properties policy.json\n" +
+ "ionosctl object-storage bucket policy put --json-properties-example",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ return nil
+ }
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, constants.FlagJsonProperties)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ fmt.Fprintln(c.Command.Command.OutOrStdout(), policyExample)
+ return nil
+ }
+
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ input := viper.GetString(core.GetFlagName(c.NS, constants.FlagJsonProperties))
+
+ data, err := readInput(input)
+ if err != nil {
+ return fmt.Errorf("reading policy input: %w", err)
+ }
+
+ var bp objectstorage.BucketPolicy
+ if err := json.Unmarshal(data, &bp); err != nil {
+ return fmt.Errorf("parsing policy JSON: %w", err)
+ }
+
+ _, err = client.MustObjectStorage().ObjectStorageClient.PolicyApi.PutBucketPolicy(c.Context, name).
+ BucketPolicy(bp).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Bucket policy for %q applied successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(constants.FlagJsonProperties, "", "", "Path to a JSON file containing the bucket policy")
+ cmd.AddBoolFlag(constants.FlagJsonPropertiesExample, "", false, "Print an example bucket policy JSON and exit")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
+
+// readInput reads the policy JSON from a file path.
+func readInput(path string) ([]byte, error) {
+ return os.ReadFile(path)
+}
diff --git a/commands/object-storage/bucket/policy/status.go b/commands/object-storage/bucket/policy/status.go
new file mode 100644
index 0000000000..c3e984766e
--- /dev/null
+++ b/commands/object-storage/bucket/policy/status.go
@@ -0,0 +1,63 @@
+package policy
+
+import (
+ "context"
+
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+type policyStatusInfo struct {
+ Bucket string `json:"Bucket"`
+ IsPublic bool `json:"IsPublic"`
+}
+
+func StatusCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "policy",
+ Verb: "status",
+ Aliases: []string{"s"},
+ ShortDesc: "Check if a bucket policy makes the bucket public",
+ Example: "ionosctl object-storage bucket policy status --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.PolicyApi.GetBucketPolicyStatus(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ info := policyStatusInfo{
+ Bucket: name,
+ IsPublic: result.GetIsPublic(),
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(statusCols, info, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.Flags().StringSlice(constants.ArgCols, nil, table.ColsMessage(statusCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(statusCols), cobra.ShellCompDirectiveNoFileComp
+ })
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/publicaccessblock/delete.go b/commands/object-storage/bucket/publicaccessblock/delete.go
new file mode 100644
index 0000000000..1be9b6cfab
--- /dev/null
+++ b/commands/object-storage/bucket/publicaccessblock/delete.go
@@ -0,0 +1,51 @@
+package publicaccessblock
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+)
+
+func DeleteCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "public-access-block",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete the public access block configuration for a bucket",
+ Example: "ionosctl object-storage bucket public-access-block delete --name my-bucket\nionosctl object-storage bucket public-access-block delete --name my-bucket -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete public access block configuration for bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.PublicAccessBlockApi.DeletePublicAccessBlock(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Public access block configuration for %q deleted successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/publicaccessblock/get.go b/commands/object-storage/bucket/publicaccessblock/get.go
new file mode 100644
index 0000000000..620882e1cf
--- /dev/null
+++ b/commands/object-storage/bucket/publicaccessblock/get.go
@@ -0,0 +1,60 @@
+package publicaccessblock
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "public-access-block",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the public access block configuration for a bucket",
+ Example: "ionosctl object-storage bucket public-access-block get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.PublicAccessBlockApi.GetPublicAccessBlock(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ info := publicAccessBlockInfo{
+ BlockPublicAcls: derefBool(result.BlockPublicAcls),
+ IgnorePublicAcls: derefBool(result.IgnorePublicAcls),
+ BlockPublicPolicy: derefBool(result.BlockPublicPolicy),
+ RestrictPublicBuckets: derefBool(result.RestrictPublicBuckets),
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, info, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
+
+func derefBool(b *bool) bool {
+ if b == nil {
+ return false
+ }
+ return *b
+}
diff --git a/commands/object-storage/bucket/publicaccessblock/publicaccessblock.go b/commands/object-storage/bucket/publicaccessblock/publicaccessblock.go
new file mode 100644
index 0000000000..53182294e8
--- /dev/null
+++ b/commands/object-storage/bucket/publicaccessblock/publicaccessblock.go
@@ -0,0 +1,48 @@
+package publicaccessblock
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+var allCols = []table.Column{
+ {Name: "BlockPublicAcls", JSONPath: "BlockPublicAcls", Default: true},
+ {Name: "IgnorePublicAcls", JSONPath: "IgnorePublicAcls", Default: true},
+ {Name: "BlockPublicPolicy", JSONPath: "BlockPublicPolicy", Default: true},
+ {Name: "RestrictPublicBuckets", JSONPath: "RestrictPublicBuckets", Default: true},
+}
+
+type publicAccessBlockInfo struct {
+ BlockPublicAcls bool `json:"BlockPublicAcls"`
+ IgnorePublicAcls bool `json:"IgnorePublicAcls"`
+ BlockPublicPolicy bool `json:"BlockPublicPolicy"`
+ RestrictPublicBuckets bool `json:"RestrictPublicBuckets"`
+}
+
+func PublicAccessBlockCmd() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "public-access-block",
+ Aliases: []string{"pab"},
+ Short: "Public access block operations for contract-owned object storage buckets",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+ cmd.AddCommand(DeleteCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/bucket/publicaccessblock/put.go b/commands/object-storage/bucket/publicaccessblock/put.go
new file mode 100644
index 0000000000..430382dc00
--- /dev/null
+++ b/commands/object-storage/bucket/publicaccessblock/put.go
@@ -0,0 +1,83 @@
+package publicaccessblock
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "os"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+const publicAccessBlockExample = `{
+ "BlockPublicAcls": true,
+ "IgnorePublicAcls": true,
+ "BlockPublicPolicy": true,
+ "RestrictPublicBuckets": true
+}`
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "public-access-block",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Create or replace the public access block configuration for a bucket",
+ LongDesc: "Create or replace the public access block configuration for a bucket. " +
+ "The configuration must be provided as a path to a JSON file via --json-properties. " +
+ "Use --json-properties-example to see an example public access block configuration.",
+ Example: "ionosctl object-storage bucket public-access-block put --name my-bucket --json-properties config.json\n" +
+ "ionosctl object-storage bucket public-access-block put --json-properties-example",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ return nil
+ }
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, constants.FlagJsonProperties)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ fmt.Fprintln(c.Command.Command.OutOrStdout(), publicAccessBlockExample)
+ return nil
+ }
+
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ input := viper.GetString(core.GetFlagName(c.NS, constants.FlagJsonProperties))
+
+ data, err := os.ReadFile(input)
+ if err != nil {
+ return fmt.Errorf("reading public access block input: %w", err)
+ }
+
+ var req objectstorage.BlockPublicAccessPayload
+ if err := json.Unmarshal(data, &req); err != nil {
+ return fmt.Errorf("parsing public access block JSON: %w", err)
+ }
+
+ _, err = client.MustObjectStorage().ObjectStorageClient.PublicAccessBlockApi.PutPublicAccessBlock(c.Context, name).
+ BlockPublicAccessPayload(req).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Public access block configuration for %q applied successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(constants.FlagJsonProperties, "", "", "Path to a JSON file containing the public access block configuration")
+ cmd.AddBoolFlag(constants.FlagJsonPropertiesExample, "", false, "Print an example public access block configuration JSON and exit")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/tagging/delete.go b/commands/object-storage/bucket/tagging/delete.go
new file mode 100644
index 0000000000..fed3b640d8
--- /dev/null
+++ b/commands/object-storage/bucket/tagging/delete.go
@@ -0,0 +1,51 @@
+package tagging
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+)
+
+func DeleteCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "tagging",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete the tagging configuration for a bucket",
+ Example: "ionosctl object-storage bucket tagging delete --name my-bucket\nionosctl object-storage bucket tagging delete --name my-bucket -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete tagging configuration for bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.TaggingApi.DeleteBucketTagging(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Tagging configuration for %q deleted successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/tagging/get.go b/commands/object-storage/bucket/tagging/get.go
new file mode 100644
index 0000000000..b2589e02b3
--- /dev/null
+++ b/commands/object-storage/bucket/tagging/get.go
@@ -0,0 +1,54 @@
+package tagging
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "tagging",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the tagging configuration for a bucket",
+ Example: "ionosctl object-storage bucket tagging get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.TaggingApi.GetBucketTagging(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ var tags []tagInfo
+ for _, t := range result.GetTagSet() {
+ tags = append(tags, tagInfo{
+ Key: t.GetKey(),
+ Value: t.GetValue(),
+ })
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, tags, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/tagging/put.go b/commands/object-storage/bucket/tagging/put.go
new file mode 100644
index 0000000000..1b08ec0de4
--- /dev/null
+++ b/commands/object-storage/bucket/tagging/put.go
@@ -0,0 +1,83 @@
+package tagging
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "os"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+const taggingExample = `{
+ "TagSet": [
+ {"Key": "Environment", "Value": "production"},
+ {"Key": "Team", "Value": "platform"}
+ ]
+}`
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "tagging",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Create or replace the tagging configuration for a bucket",
+ LongDesc: "Create or replace the tagging configuration for a bucket. " +
+ "The configuration must be provided as a path to a JSON file via --json-properties. " +
+ "Use --json-properties-example to see an example tagging configuration.",
+ Example: "ionosctl object-storage bucket tagging put --name my-bucket --json-properties tags.json\n" +
+ "ionosctl object-storage bucket tagging put --json-properties-example",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ return nil
+ }
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, constants.FlagJsonProperties)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ fmt.Fprintln(c.Command.Command.OutOrStdout(), taggingExample)
+ return nil
+ }
+
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ input := viper.GetString(core.GetFlagName(c.NS, constants.FlagJsonProperties))
+
+ data, err := os.ReadFile(input)
+ if err != nil {
+ return fmt.Errorf("reading tagging input: %w", err)
+ }
+
+ var tagReq objectstorage.PutBucketTaggingRequest
+ if err := json.Unmarshal(data, &tagReq); err != nil {
+ return fmt.Errorf("parsing tagging JSON: %w", err)
+ }
+
+ _, err = client.MustObjectStorage().ObjectStorageClient.TaggingApi.PutBucketTagging(c.Context, name).
+ PutBucketTaggingRequest(tagReq).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Tagging configuration for %q applied successfully\n", name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(constants.FlagJsonProperties, "", "", "Path to a JSON file containing the tagging configuration")
+ cmd.AddBoolFlag(constants.FlagJsonPropertiesExample, "", false, "Print an example tagging configuration JSON and exit")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/tagging/tagging.go b/commands/object-storage/bucket/tagging/tagging.go
new file mode 100644
index 0000000000..b3eea0c74f
--- /dev/null
+++ b/commands/object-storage/bucket/tagging/tagging.go
@@ -0,0 +1,44 @@
+package tagging
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+var allCols = []table.Column{
+ {Name: "Key", JSONPath: "Key", Default: true},
+ {Name: "Value", JSONPath: "Value", Default: true},
+}
+
+type tagInfo struct {
+ Key string `json:"Key"`
+ Value string `json:"Value"`
+}
+
+func TaggingCmd() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "tagging",
+ Aliases: []string{"tag"},
+ Short: "Bucket tagging operations for contract-owned object storage",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+ cmd.AddCommand(DeleteCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/bucket/versioning/get.go b/commands/object-storage/bucket/versioning/get.go
new file mode 100644
index 0000000000..7ba1797a2d
--- /dev/null
+++ b/commands/object-storage/bucket/versioning/get.go
@@ -0,0 +1,61 @@
+package versioning
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+type versioningResult struct {
+ Name string `json:"Name"`
+ Versioning string `json:"Versioning"`
+}
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "bucket-versioning",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the versioning state of a bucket",
+ Example: "ionosctl object-storage bucket versioning get --name my-bucket",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ apiResult, _, err := client.MustObjectStorage().ObjectStorageClient.VersioningApi.GetBucketVersioning(c.Context, name).Execute()
+ if err != nil {
+ return err
+ }
+
+ status := "Disabled"
+ if apiResult.HasStatus() {
+ status = string(apiResult.GetStatus())
+ }
+
+ result := versioningResult{
+ Name: name,
+ Versioning: status,
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, result, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/versioning/set.go b/commands/object-storage/bucket/versioning/set.go
new file mode 100644
index 0000000000..934013b4c4
--- /dev/null
+++ b/commands/object-storage/bucket/versioning/set.go
@@ -0,0 +1,65 @@
+package versioning
+
+import (
+ "context"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+const flagStatus = "status"
+
+func SetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "bucket-versioning",
+ Verb: "set",
+ Aliases: []string{"s"},
+ ShortDesc: "Enable or suspend versioning on a bucket",
+ Example: "ionosctl object-storage bucket versioning set --name my-bucket --status Enabled\nionosctl object-storage bucket versioning set --name my-bucket --status Suspended",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagStatus)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ status := viper.GetString(core.GetFlagName(c.NS, flagStatus))
+
+ req := objectstorage.NewPutBucketVersioningRequest()
+ req.SetStatus(objectstorage.BucketVersioningStatus(status))
+
+ _, err := client.MustObjectStorage().ObjectStorageClient.VersioningApi.PutBucketVersioning(c.Context, name).
+ PutBucketVersioningRequest(*req).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ result := versioningResult{
+ Name: name,
+ Versioning: status,
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, result, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagStatus, "", "", "Versioning status: Enabled or Suspended", core.RequiredFlagOption())
+ _ = cmd.Command.RegisterFlagCompletionFunc(flagStatus, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return []string{"Enabled", "Suspended"}, cobra.ShellCompDirectiveNoFileComp
+ })
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/bucket/versioning/versioning.go b/commands/object-storage/bucket/versioning/versioning.go
new file mode 100644
index 0000000000..83c3399acc
--- /dev/null
+++ b/commands/object-storage/bucket/versioning/versioning.go
@@ -0,0 +1,36 @@
+package versioning
+
+import (
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+ "github.com/spf13/cobra"
+)
+
+var allCols = []table.Column{
+ {Name: "Name", JSONPath: "Name", Default: true},
+ {Name: "Versioning", JSONPath: "Versioning", Default: true},
+}
+
+func Root() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "versioning",
+ Aliases: []string{"ver"},
+ Short: "Manage bucket versioning configuration",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(SetCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/completer/completer.go b/commands/object-storage/completer/completer.go
new file mode 100644
index 0000000000..7d29a38839
--- /dev/null
+++ b/commands/object-storage/completer/completer.go
@@ -0,0 +1,49 @@
+package completer
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+)
+
+// BucketNames returns all bucket names for shell autocompletion.
+func BucketNames() []string {
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.BucketsApi.ListBuckets(context.Background()).Execute()
+ if err != nil {
+ return nil
+ }
+
+ var names []string
+ for _, b := range result.GetBuckets() {
+ loc, _, locErr := client.MustObjectStorage().ObjectStorageClient.BucketsApi.GetBucketLocation(context.Background(), b.GetName()).Execute()
+ if locErr != nil || loc.GetLocationConstraint() != viper.GetString(constants.FlagLocation) {
+ continue
+ }
+
+ names = append(names, b.GetName())
+ }
+ return names
+}
+
+// ObjectKeys returns object keys for a given bucket.
+func ObjectKeys(bucket string) []string {
+ if bucket == "" {
+ return nil
+ }
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.ObjectsApi.ListObjectsV2(context.Background(), bucket).
+ MaxKeys(100).
+ Execute()
+ if err != nil {
+ return nil
+ }
+
+ var keys []string
+ for _, obj := range result.Contents {
+ keys = append(keys, obj.GetKey())
+ }
+ return keys
+}
diff --git a/commands/object-storage/object/copy.go b/commands/object-storage/object/copy.go
new file mode 100644
index 0000000000..b302fa2ad7
--- /dev/null
+++ b/commands/object-storage/object/copy.go
@@ -0,0 +1,73 @@
+package object
+
+import (
+ "context"
+ "time"
+
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+type copyObjectInfo struct {
+ ETag string `json:"ETag"`
+ LastModified string `json:"LastModified"`
+}
+
+func CopyCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object",
+ Verb: "copy",
+ Aliases: []string{"cp"},
+ ShortDesc: "Copy an object",
+ LongDesc: "Copy an object within or between buckets. The --copy-source must be in the format /source-bucket/source-key.",
+ Example: "ionosctl object-storage object copy --name dest-bucket --key dest-key --copy-source /source-bucket/source-key",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey, flagCopySource)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ copySource := viper.GetString(core.GetFlagName(c.NS, flagCopySource))
+
+ result, _, err := client.MustObjectStorage().ObjectStorageClient.ObjectsApi.CopyObject(c.Context, name, key).
+ XAmzCopySource(copySource).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ info := copyObjectInfo{
+ ETag: result.GetETag(),
+ }
+ if lm := result.GetLastModified(); !lm.IsZero() {
+ info.LastModified = lm.Format(time.RFC3339)
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(copyCols, info, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Destination bucket name", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Destination object key", core.RequiredFlagOption())
+ cmd.AddStringFlag(flagCopySource, "", "", "Source object in format /source-bucket/source-key", core.RequiredFlagOption())
+
+ cmd.Command.Flags().StringSlice(constants.ArgCols, nil, table.ColsMessage(copyCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(copyCols), cobra.ShellCompDirectiveNoFileComp
+ })
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/delete.go b/commands/object-storage/object/delete.go
new file mode 100644
index 0000000000..e3804fa918
--- /dev/null
+++ b/commands/object-storage/object/delete.go
@@ -0,0 +1,245 @@
+package object
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+)
+
+const flagBypassGovernanceRetention = "bypass-governance-retention"
+
+func DeleteCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete an object or all objects from a bucket",
+ LongDesc: "Delete a single object by key, or all objects (including versions and delete markers) from a bucket using --all.",
+ Example: "ionosctl object-storage object delete --name my-bucket --key photos/image.jpg\nionosctl object-storage object delete --name my-bucket --key photos/image.jpg --version-id abc123 -f\nionosctl object-storage object delete --name my-bucket --all -f\nionosctl object-storage object delete --name my-bucket --all --bypass-governance-retention -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlagsSets(c.Command, c.NS,
+ []string{constants.FlagName, flagKey},
+ []string{constants.FlagName, constants.ArgAll},
+ )
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+
+ bypassGovernance := viper.GetBool(core.GetFlagName(c.NS, flagBypassGovernanceRetention))
+
+ if viper.GetBool(core.GetFlagName(c.NS, constants.ArgAll)) {
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete ALL objects in bucket %q", name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ if err := emptyBucket(c, client.MustObjectStorage().ObjectStorageClient, name, bypassGovernance); err != nil {
+ return err
+ }
+
+ c.Msg("All objects deleted from bucket %q", name)
+ return nil
+ }
+
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete object %q from bucket %q", key, name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ req := client.MustObjectStorage().ObjectStorageClient.ObjectsApi.DeleteObject(c.Context, name, key).XAmzBypassGovernanceRetention(bypassGovernance)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+
+ _, _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Object %q deleted from bucket %q\n", key, name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key to delete",
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID to delete a specific version")
+ cmd.AddBoolFlag(constants.ArgAll, constants.ArgAllShort, false, "Delete all objects in the bucket")
+ cmd.AddBoolFlag(flagBypassGovernanceRetention, "", false, "Bypass Governance-mode Object Lock restrictions to delete the object")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
+
+// emptyBucket deletes all objects, object versions, and delete markers in the bucket.
+func emptyBucket(c *core.CommandConfig, s3 *objectstorage.APIClient, bucket string, bypassGovernance bool) error {
+ // First pass: delete current objects via ListObjectsV2.
+ if err := deleteCurrentObjects(c, s3, bucket, bypassGovernance); err != nil {
+ return err
+ }
+
+ // Second pass: delete all versions and delete markers via ListObjectVersions.
+ if err := deleteAllVersions(c, s3, bucket, bypassGovernance); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func deleteCurrentObjects(c *core.CommandConfig, s3 *objectstorage.APIClient, bucket string, bypassGovernance bool) error {
+ var continuationToken string
+ totalDeleted := 0
+
+ for {
+ req := s3.ObjectsApi.ListObjectsV2(c.Context, bucket).MaxKeys(1000)
+ if continuationToken != "" {
+ req = req.ContinuationToken(continuationToken)
+ }
+
+ result, _, err := req.Execute()
+ if err != nil {
+ return fmt.Errorf("listing objects: %w", err)
+ }
+
+ if len(result.Contents) == 0 {
+ break
+ }
+
+ if err := batchDelete(c.Context, s3, bucket, objectsToIdentifiers(result.Contents), bypassGovernance); err != nil {
+ return err
+ }
+
+ totalDeleted += len(result.Contents)
+ c.Verbose("Deleted %d objects...", totalDeleted)
+
+ if !result.IsTruncated {
+ break
+ }
+
+ if result.NextContinuationToken != nil {
+ continuationToken = *result.NextContinuationToken
+ } else {
+ break
+ }
+ }
+
+ return nil
+}
+
+func deleteAllVersions(c *core.CommandConfig, s3 *objectstorage.APIClient, bucket string, bypassGovernance bool) error {
+ var keyMarker, versionMarker string
+ totalDeleted := 0
+
+ for {
+ req := s3.VersionsApi.ListObjectVersions(c.Context, bucket).MaxKeys(1000)
+ if keyMarker != "" {
+ req = req.KeyMarker(keyMarker)
+ }
+ if versionMarker != "" {
+ req = req.VersionIdMarker(versionMarker)
+ }
+
+ result, _, err := req.Execute()
+ if err != nil {
+ return fmt.Errorf("listing object versions: %w", err)
+ }
+
+ ids := versionsToIdentifiers(result.GetVersions())
+ ids = append(ids, deleteMarkersToIdentifiers(result.GetDeleteMarkers())...)
+
+ if len(ids) == 0 {
+ break
+ }
+
+ if err := batchDelete(c.Context, s3, bucket, ids, bypassGovernance); err != nil {
+ return err
+ }
+
+ totalDeleted += len(ids)
+ c.Verbose("Deleted %d versions/markers...", totalDeleted)
+
+ if !result.GetIsTruncated() {
+ break
+ }
+
+ keyMarker = result.GetNextKeyMarker()
+ versionMarker = result.GetNextVersionIdMarker()
+ if keyMarker == "" {
+ break
+ }
+ }
+
+ return nil
+}
+
+func batchDelete(ctx context.Context, s3 *objectstorage.APIClient, bucket string, ids []objectstorage.ObjectIdentifier, bypassGovernance bool) error {
+ delReq := objectstorage.NewDeleteObjectsRequest()
+ delReq.SetObjects(ids)
+ delReq.SetQuiet(true)
+
+ req := s3.ObjectsApi.DeleteObjects(ctx, bucket).DeleteObjectsRequest(*delReq).XAmzBypassGovernanceRetention(bypassGovernance)
+ result, _, err := req.Execute()
+ if err != nil {
+ return fmt.Errorf("deleting objects: %w", err)
+ }
+
+ if result != nil && len(result.Errors) > 0 {
+ var details []string
+ for _, e := range result.Errors {
+ details = append(details, fmt.Sprintf(" %s: %s (key: %s)", e.GetCode(), e.GetMessage(), e.GetKey()))
+ }
+ return fmt.Errorf("failed to delete %d object(s):\n%s",
+ len(result.Errors), strings.Join(details, "\n"))
+ }
+
+ return nil
+}
+
+func objectsToIdentifiers(objects []objectstorage.Object) []objectstorage.ObjectIdentifier {
+ ids := make([]objectstorage.ObjectIdentifier, len(objects))
+ for i, obj := range objects {
+ ids[i] = objectstorage.ObjectIdentifier{Key: obj.GetKey()}
+ }
+ return ids
+}
+
+func versionsToIdentifiers(versions []objectstorage.ObjectVersion) []objectstorage.ObjectIdentifier {
+ ids := make([]objectstorage.ObjectIdentifier, 0, len(versions))
+ for _, v := range versions {
+ id := objectstorage.ObjectIdentifier{Key: v.GetKey()}
+ if vid := v.GetVersionId(); vid != "" {
+ id.VersionId = &vid
+ }
+ ids = append(ids, id)
+ }
+ return ids
+}
+
+func deleteMarkersToIdentifiers(markers []objectstorage.DeleteMarkerEntry) []objectstorage.ObjectIdentifier {
+ ids := make([]objectstorage.ObjectIdentifier, 0, len(markers))
+ for _, dm := range markers {
+ id := objectstorage.ObjectIdentifier{Key: dm.GetKey()}
+ if vid := dm.GetVersionId(); vid != "" {
+ id.VersionId = &vid
+ }
+ ids = append(ids, id)
+ }
+ return ids
+}
diff --git a/commands/object-storage/object/delete_test.go b/commands/object-storage/object/delete_test.go
new file mode 100644
index 0000000000..0a4bfdf348
--- /dev/null
+++ b/commands/object-storage/object/delete_test.go
@@ -0,0 +1,142 @@
+package object
+
+import (
+ "testing"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/stretchr/testify/assert"
+)
+
+func strPtr(s string) *string { return &s }
+
+func TestObjectsToIdentifiers(t *testing.T) {
+ tests := []struct {
+ name string
+ objects []objectstorage.Object
+ want []objectstorage.ObjectIdentifier
+ }{
+ {
+ name: "empty slice",
+ objects: []objectstorage.Object{},
+ want: []objectstorage.ObjectIdentifier{},
+ },
+ {
+ name: "multiple objects with keys",
+ objects: []objectstorage.Object{
+ {Key: strPtr("photos/a.jpg")},
+ {Key: strPtr("docs/b.pdf")},
+ },
+ want: []objectstorage.ObjectIdentifier{
+ {Key: "photos/a.jpg"},
+ {Key: "docs/b.pdf"},
+ },
+ },
+ {
+ name: "object with nil Key returns empty string",
+ objects: []objectstorage.Object{
+ {Key: nil},
+ },
+ want: []objectstorage.ObjectIdentifier{
+ {Key: ""},
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ got := objectsToIdentifiers(tt.objects)
+ assert.Equal(t, tt.want, got)
+ })
+ }
+}
+
+func TestVersionsToIdentifiers(t *testing.T) {
+ tests := []struct {
+ name string
+ versions []objectstorage.ObjectVersion
+ want []objectstorage.ObjectIdentifier
+ }{
+ {
+ name: "empty slice",
+ versions: []objectstorage.ObjectVersion{},
+ want: []objectstorage.ObjectIdentifier{},
+ },
+ {
+ name: "version with VersionId set",
+ versions: []objectstorage.ObjectVersion{
+ {Key: strPtr("file.txt"), VersionId: strPtr("v1")},
+ },
+ want: []objectstorage.ObjectIdentifier{
+ {Key: "file.txt", VersionId: strPtr("v1")},
+ },
+ },
+ {
+ name: "version with nil VersionId results in nil VersionId",
+ versions: []objectstorage.ObjectVersion{
+ {Key: strPtr("file.txt"), VersionId: nil},
+ },
+ want: []objectstorage.ObjectIdentifier{
+ {Key: "file.txt", VersionId: nil},
+ },
+ },
+ {
+ name: "mix of versioned and unversioned",
+ versions: []objectstorage.ObjectVersion{
+ {Key: strPtr("a.txt"), VersionId: strPtr("v1")},
+ {Key: strPtr("b.txt"), VersionId: nil},
+ {Key: strPtr("c.txt"), VersionId: strPtr("v3")},
+ },
+ want: []objectstorage.ObjectIdentifier{
+ {Key: "a.txt", VersionId: strPtr("v1")},
+ {Key: "b.txt", VersionId: nil},
+ {Key: "c.txt", VersionId: strPtr("v3")},
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ got := versionsToIdentifiers(tt.versions)
+ assert.Equal(t, tt.want, got)
+ })
+ }
+}
+
+func TestDeleteMarkersToIdentifiers(t *testing.T) {
+ tests := []struct {
+ name string
+ markers []objectstorage.DeleteMarkerEntry
+ want []objectstorage.ObjectIdentifier
+ }{
+ {
+ name: "empty slice",
+ markers: []objectstorage.DeleteMarkerEntry{},
+ want: []objectstorage.ObjectIdentifier{},
+ },
+ {
+ name: "marker with VersionId set",
+ markers: []objectstorage.DeleteMarkerEntry{
+ {Key: strPtr("removed.txt"), VersionId: strPtr("dm1")},
+ },
+ want: []objectstorage.ObjectIdentifier{
+ {Key: "removed.txt", VersionId: strPtr("dm1")},
+ },
+ },
+ {
+ name: "marker with nil VersionId results in nil VersionId",
+ markers: []objectstorage.DeleteMarkerEntry{
+ {Key: strPtr("removed.txt"), VersionId: nil},
+ },
+ want: []objectstorage.ObjectIdentifier{
+ {Key: "removed.txt", VersionId: nil},
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ got := deleteMarkersToIdentifiers(tt.markers)
+ assert.Equal(t, tt.want, got)
+ })
+ }
+}
diff --git a/commands/object-storage/object/get.go b/commands/object-storage/object/get.go
new file mode 100644
index 0000000000..f882416b5e
--- /dev/null
+++ b/commands/object-storage/object/get.go
@@ -0,0 +1,81 @@
+package object
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "os"
+ "path/filepath"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Download an object to a file",
+ Example: "ionosctl object-storage object get --name my-bucket --key photos/image.jpg\nionosctl object-storage object get --name my-bucket --key photos/image.jpg --destination ./local-image.jpg",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ destination := viper.GetString(core.GetFlagName(c.NS, flagDestination))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+
+ if destination == "" {
+ destination = filepath.Base(key)
+ }
+
+ req := client.MustObjectStorage().ObjectStorageClient.ObjectsApi.GetObject(c.Context, name, key)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+
+ tmpFile, _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+ defer func() {
+ tmpFile.Close()
+ os.Remove(tmpFile.Name())
+ }()
+
+ outFile, err := os.Create(destination)
+ if err != nil {
+ return fmt.Errorf("creating destination file %q: %w", destination, err)
+ }
+ defer outFile.Close()
+
+ if _, err := io.Copy(outFile, tmpFile); err != nil {
+ return fmt.Errorf("writing to %q: %w", destination, err)
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Object %q downloaded to %q\n", key, destination)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key to download", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagDestination, "d", "", "Local file path for download (defaults to the basename of the key)")
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID of the object to download")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/head.go b/commands/object-storage/object/head.go
new file mode 100644
index 0000000000..1926d8feff
--- /dev/null
+++ b/commands/object-storage/object/head.go
@@ -0,0 +1,67 @@
+package object
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+type headObjectInfo struct {
+ Key string `json:"Key"`
+ ContentType string `json:"ContentType"`
+ ContentLength string `json:"ContentLength"`
+ LastModified string `json:"LastModified"`
+ ETag string `json:"ETag"`
+}
+
+func HeadCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object",
+ Verb: "head",
+ Aliases: []string{"hd"},
+ ShortDesc: "Get object metadata",
+ Example: "ionosctl object-storage object head --name my-bucket --key photos/image.jpg",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+
+ _, apiResp, err := client.MustObjectStorage().ObjectStorageClient.ObjectsApi.HeadObject(c.Context, name, key).Execute()
+ if err != nil {
+ return err
+ }
+
+ info := headObjectInfo{
+ Key: key,
+ ContentType: apiResp.Header.Get("Content-Type"),
+ ContentLength: apiResp.Header.Get("Content-Length"),
+ LastModified: apiResp.Header.Get("Last-Modified"),
+ ETag: apiResp.Header.Get("ETag"),
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(headCols, info, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/legal-hold/get.go b/commands/object-storage/object/legal-hold/get.go
new file mode 100644
index 0000000000..98b5f53214
--- /dev/null
+++ b/commands/object-storage/object/legal-hold/get.go
@@ -0,0 +1,63 @@
+package legalhold
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-legal-hold",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the legal hold status of an object",
+ Example: "ionosctl object-storage object legal-hold get --name my-bucket --key my-object",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+
+ req := client.MustObjectStorage().ObjectStorageClient.ObjectLockApi.
+ GetObjectLegalHold(c.Context, name, key)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+
+ result, _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ info := legalHoldInfo{
+ Status: result.GetStatus(),
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, info, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID of the object")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/legal-hold/legal_hold.go b/commands/object-storage/object/legal-hold/legal_hold.go
new file mode 100644
index 0000000000..d9a78e580d
--- /dev/null
+++ b/commands/object-storage/object/legal-hold/legal_hold.go
@@ -0,0 +1,48 @@
+package legalhold
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+const (
+ flagKey = "key"
+ flagKeyShort = "k"
+ flagVersionId = "version-id"
+ flagStatus = "status"
+)
+
+var allCols = []table.Column{
+ {Name: "Status", JSONPath: "Status", Default: true},
+}
+
+type legalHoldInfo struct {
+ Status string `json:"Status"`
+}
+
+func Root() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "legal-hold",
+ Aliases: []string{"lh"},
+ Short: "Manage Object Lock legal hold for objects",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/object/legal-hold/put.go b/commands/object-storage/object/legal-hold/put.go
new file mode 100644
index 0000000000..25ed4de99e
--- /dev/null
+++ b/commands/object-storage/object/legal-hold/put.go
@@ -0,0 +1,73 @@
+package legalhold
+
+import (
+ "context"
+ "fmt"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-legal-hold",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Apply or remove a legal hold on an object",
+ LongDesc: "Apply or remove a legal hold configuration on an object. " +
+ "Requires the bucket to have been created with Object Lock enabled.",
+ Example: "ionosctl object-storage object legal-hold put --name my-bucket --key my-object --status ON\n" +
+ "ionosctl object-storage object legal-hold put --name my-bucket --key my-object --status OFF",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey, flagStatus)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ status := viper.GetString(core.GetFlagName(c.NS, flagStatus))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+
+ cfg := objectstorage.NewObjectLegalHoldConfiguration()
+ cfg.SetStatus(status)
+
+ req := client.MustObjectStorage().ObjectStorageClient.ObjectLockApi.
+ PutObjectLegalHold(c.Context, name, key).
+ ObjectLegalHoldConfiguration(*cfg)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+
+ _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Legal hold %s for %q in bucket %q applied successfully\n", status, key, name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagStatus, "", "", "Legal hold status: ON or OFF", core.RequiredFlagOption())
+ _ = cmd.Command.RegisterFlagCompletionFunc(flagStatus, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return []string{"ON", "OFF"}, cobra.ShellCompDirectiveNoFileComp
+ })
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID of the object")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/list.go b/commands/object-storage/object/list.go
new file mode 100644
index 0000000000..f4cf903ea7
--- /dev/null
+++ b/commands/object-storage/object/list.go
@@ -0,0 +1,145 @@
+package object
+
+import (
+ "context"
+ "fmt"
+ "time"
+
+ humanize "github.com/dustin/go-humanize"
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+const (
+ flagPrefix = "prefix"
+ flagMaxKeys = "max-keys"
+)
+
+var listCols = []table.Column{
+ {Name: "Key", JSONPath: "Key", Default: true},
+ {Name: "Size", JSONPath: "Size", Default: true},
+ {Name: "LastModified", JSONPath: "LastModified", Default: true},
+ {Name: "StorageClass", JSONPath: "StorageClass", Default: true},
+ {Name: "ETag", JSONPath: "ETag"},
+}
+
+type listObjectInfo struct {
+ Key string `json:"Key"`
+ Size string `json:"Size"`
+ LastModified time.Time `json:"LastModified"`
+ StorageClass string `json:"StorageClass"`
+ ETag string `json:"ETag"`
+}
+
+func ListCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object",
+ Verb: "list",
+ Aliases: []string{"l", "ls"},
+ ShortDesc: "List objects in a bucket",
+ Example: "ionosctl object-storage object list --name my-bucket\nionosctl object-storage object list --name my-bucket --prefix photos/ --max-keys 100",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName)
+ },
+ CmdRun: runListObjects,
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagPrefix, "p", "", "Filter objects by key prefix (e.g. photos/)")
+ cmd.AddInt32Flag(flagMaxKeys, "", 1000, "Maximum number of objects to return (0 for no limit)")
+
+ cmd.Command.Flags().StringSlice(constants.ArgCols, nil, table.ColsMessage(listCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(listCols), cobra.ShellCompDirectiveNoFileComp
+ })
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
+
+func runListObjects(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ prefix := viper.GetString(core.GetFlagName(c.NS, flagPrefix))
+ maxKeys := viper.GetInt32(core.GetFlagName(c.NS, flagMaxKeys))
+
+ s3 := client.MustObjectStorage().ObjectStorageClient
+
+ var allObjects []listObjectInfo
+ var continuationToken string
+ noLimit := maxKeys <= 0
+ remaining := maxKeys
+
+ for {
+ req := s3.ObjectsApi.ListObjectsV2(c.Context, name)
+
+ if prefix != "" {
+ req = req.Prefix(prefix)
+ }
+
+ if !noLimit {
+ req = req.MaxKeys(min(remaining, 1000))
+ }
+
+ if continuationToken != "" {
+ req = req.ContinuationToken(continuationToken)
+ }
+
+ result, _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ allObjects = append(allObjects, convertObjects(result.Contents)...)
+
+ if !noLimit {
+ remaining -= int32(len(result.Contents))
+ if remaining <= 0 {
+ break
+ }
+ }
+
+ if !result.IsTruncated || result.NextContinuationToken == nil {
+ break
+ }
+ continuationToken = *result.NextContinuationToken
+ }
+
+ if len(allObjects) == 0 {
+ fmt.Fprintln(c.Command.Command.OutOrStdout(), "No objects found")
+ return nil
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(listCols, allObjects, cols))
+}
+
+func convertObjects(objects []objectstorage.Object) []listObjectInfo {
+ infos := make([]listObjectInfo, 0, len(objects))
+ for _, obj := range objects {
+ info := listObjectInfo{
+ Key: obj.GetKey(),
+ Size: humanize.IBytes(uint64(int64(obj.GetSize()))),
+ ETag: obj.GetETag(),
+ }
+ if obj.LastModified != nil {
+ info.LastModified = obj.LastModified.Time
+ }
+ if obj.StorageClass != nil {
+ info.StorageClass = string(*obj.StorageClass)
+ }
+ infos = append(infos, info)
+ }
+ return infos
+}
diff --git a/commands/object-storage/object/list_test.go b/commands/object-storage/object/list_test.go
new file mode 100644
index 0000000000..7de9d85948
--- /dev/null
+++ b/commands/object-storage/object/list_test.go
@@ -0,0 +1,168 @@
+package object
+
+import (
+ "testing"
+ "time"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/stretchr/testify/assert"
+)
+
+func ptr[T any](v T) *T { return &v }
+
+func TestConvertObjects(t *testing.T) {
+ fixedTime := time.Date(2025, 6, 15, 10, 30, 0, 0, time.UTC)
+ storageClass := objectstorage.OBJECTSTORAGECLASS_STANDARD
+
+ tests := []struct {
+ name string
+ input []objectstorage.Object
+ expected []listObjectInfo
+ }{
+ {
+ name: "empty slice",
+ input: []objectstorage.Object{},
+ expected: []listObjectInfo{},
+ },
+ {
+ name: "all fields populated",
+ input: []objectstorage.Object{
+ {
+ Key: ptr("photos/cat.jpg"),
+ Size: ptr(int32(1024)),
+ LastModified: &objectstorage.IonosTime{Time: fixedTime},
+ StorageClass: &storageClass,
+ ETag: ptr("\"abc123\""),
+ },
+ },
+ expected: []listObjectInfo{
+ {
+ Key: "photos/cat.jpg",
+ Size: "1.0 KiB",
+ LastModified: fixedTime,
+ StorageClass: "STANDARD",
+ ETag: "\"abc123\"",
+ },
+ },
+ },
+ {
+ name: "nil LastModified yields zero time",
+ input: []objectstorage.Object{
+ {
+ Key: ptr("file.txt"),
+ Size: ptr(int32(512)),
+ LastModified: nil,
+ StorageClass: &storageClass,
+ ETag: ptr("\"def456\""),
+ },
+ },
+ expected: []listObjectInfo{
+ {
+ Key: "file.txt",
+ Size: "512 B",
+ LastModified: time.Time{},
+ StorageClass: "STANDARD",
+ ETag: "\"def456\"",
+ },
+ },
+ },
+ {
+ name: "nil StorageClass yields empty string",
+ input: []objectstorage.Object{
+ {
+ Key: ptr("data.bin"),
+ Size: ptr(int32(2048)),
+ LastModified: &objectstorage.IonosTime{Time: fixedTime},
+ StorageClass: nil,
+ ETag: ptr("\"ghi789\""),
+ },
+ },
+ expected: []listObjectInfo{
+ {
+ Key: "data.bin",
+ Size: "2.0 KiB",
+ LastModified: fixedTime,
+ StorageClass: "",
+ ETag: "\"ghi789\"",
+ },
+ },
+ },
+ {
+ name: "nil Size returns 0 B",
+ input: []objectstorage.Object{
+ {
+ Key: ptr("empty.txt"),
+ Size: nil,
+ LastModified: &objectstorage.IonosTime{Time: fixedTime},
+ StorageClass: &storageClass,
+ ETag: ptr("\"jkl012\""),
+ },
+ },
+ expected: []listObjectInfo{
+ {
+ Key: "empty.txt",
+ Size: "0 B",
+ LastModified: fixedTime,
+ StorageClass: "STANDARD",
+ ETag: "\"jkl012\"",
+ },
+ },
+ },
+ {
+ name: "multiple objects converted correctly",
+ input: []objectstorage.Object{
+ {
+ Key: ptr("small.txt"),
+ Size: ptr(int32(100)),
+ LastModified: &objectstorage.IonosTime{Time: fixedTime},
+ StorageClass: &storageClass,
+ ETag: ptr("\"aaa\""),
+ },
+ {
+ Key: ptr("medium.bin"),
+ Size: ptr(int32(1048576)), // 1 MiB
+ LastModified: &objectstorage.IonosTime{Time: fixedTime.Add(time.Hour)},
+ StorageClass: &storageClass,
+ ETag: ptr("\"bbb\""),
+ },
+ {
+ Key: ptr("large.iso"),
+ Size: ptr(int32(1073741824)), // 1 GiB (overflows int32, but tests the path)
+ LastModified: nil,
+ StorageClass: nil,
+ ETag: ptr("\"ccc\""),
+ },
+ },
+ expected: []listObjectInfo{
+ {
+ Key: "small.txt",
+ Size: "100 B",
+ LastModified: fixedTime,
+ StorageClass: "STANDARD",
+ ETag: "\"aaa\"",
+ },
+ {
+ Key: "medium.bin",
+ Size: "1.0 MiB",
+ LastModified: fixedTime.Add(time.Hour),
+ StorageClass: "STANDARD",
+ ETag: "\"bbb\"",
+ },
+ {
+ Key: "large.iso",
+ Size: "1.0 GiB",
+ LastModified: time.Time{},
+ StorageClass: "",
+ ETag: "\"ccc\"",
+ },
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ result := convertObjects(tt.input)
+ assert.Equal(t, tt.expected, result)
+ })
+ }
+}
diff --git a/commands/object-storage/object/object.go b/commands/object-storage/object/object.go
new file mode 100644
index 0000000000..e3d19a3ccb
--- /dev/null
+++ b/commands/object-storage/object/object.go
@@ -0,0 +1,67 @@
+package object
+
+import (
+ "github.com/spf13/cobra"
+
+ legalhold "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/object/legal-hold"
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/object/retention"
+ objecttagging "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/object/tagging"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+const (
+ flagKey = "key"
+ flagKeyShort = "k"
+ flagSource = "source"
+ flagSourceShort = "s"
+ flagDestination = "destination"
+ flagVersionId = "version-id"
+ flagCopySource = "copy-source"
+ flagContentType = "content-type"
+)
+
+var headCols = []table.Column{
+ {Name: "Key", JSONPath: "Key", Default: true},
+ {Name: "ContentType", JSONPath: "ContentType", Default: true},
+ {Name: "ContentLength", JSONPath: "ContentLength", Default: true},
+ {Name: "LastModified", JSONPath: "LastModified", Default: true},
+ {Name: "ETag", JSONPath: "ETag", Default: true},
+}
+
+var copyCols = []table.Column{
+ {Name: "ETag", JSONPath: "ETag", Default: true},
+ {Name: "LastModified", JSONPath: "LastModified", Default: true},
+}
+
+func ObjectCommand() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "object",
+ Aliases: []string{"obj"},
+ Short: "Object operations for contract-owned object storage",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(headCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(headCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(ListCmd())
+ cmd.AddCommand(PutCmd())
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(DeleteCmd())
+ cmd.AddCommand(HeadCmd())
+ cmd.AddCommand(CopyCmd())
+ cmd.AddCommand(retention.Root())
+ cmd.AddCommand(legalhold.Root())
+ cmd.AddCommand(objecttagging.ObjectTaggingCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/object/put.go b/commands/object-storage/object/put.go
new file mode 100644
index 0000000000..76d8bc9f9f
--- /dev/null
+++ b/commands/object-storage/object/put.go
@@ -0,0 +1,74 @@
+package object
+
+import (
+ "context"
+ "fmt"
+ "mime"
+ "os"
+ "path/filepath"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Upload a file as an object",
+ Example: "ionosctl object-storage object put --name my-bucket --key photos/image.jpg --source ./image.jpg",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey, flagSource)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ source := viper.GetString(core.GetFlagName(c.NS, flagSource))
+ contentType := viper.GetString(core.GetFlagName(c.NS, flagContentType))
+
+ file, err := os.Open(source)
+ if err != nil {
+ return fmt.Errorf("opening source file %q: %w", source, err)
+ }
+ defer file.Close()
+
+ if contentType == "" {
+ contentType = mime.TypeByExtension(filepath.Ext(source))
+ if contentType == "" {
+ contentType = "application/octet-stream"
+ }
+ }
+
+ _, err = client.MustObjectStorage().ObjectStorageClient.ObjectsApi.PutObject(c.Context, name, key).
+ Body(file).
+ ContentType(contentType).
+ Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Object %q uploaded to bucket %q\n", key, name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key (path in the bucket)", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagSource, flagSourceShort, "", "Path to the local file to upload", core.RequiredFlagOption())
+ cmd.AddStringFlag(flagContentType, "", "", "MIME type of the object (auto-detected from file extension if omitted)")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/retention/get.go b/commands/object-storage/object/retention/get.go
new file mode 100644
index 0000000000..9b69b3d39c
--- /dev/null
+++ b/commands/object-storage/object/retention/get.go
@@ -0,0 +1,64 @@
+package retention
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-retention",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the Object Lock retention configuration for an object",
+ Example: "ionosctl object-storage object retention get --name my-bucket --key my-object",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+
+ req := client.MustObjectStorage().ObjectStorageClient.ObjectLockApi.
+ GetObjectRetention(c.Context, name, key)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+
+ result, _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ info := retentionInfo{
+ Mode: result.GetMode(),
+ RetainUntilDate: result.GetRetainUntilDate(),
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, info, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID of the object")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/retention/put.go b/commands/object-storage/object/retention/put.go
new file mode 100644
index 0000000000..50849fd390
--- /dev/null
+++ b/commands/object-storage/object/retention/put.go
@@ -0,0 +1,81 @@
+package retention
+
+import (
+ "context"
+ "fmt"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/cobra"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-retention",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Apply a retention configuration to an object",
+ LongDesc: "Place an Object Lock retention configuration on an object. " +
+ "Requires the bucket to have been created with Object Lock enabled.",
+ Example: "ionosctl object-storage object retention put --name my-bucket --key my-object --mode GOVERNANCE --retain-until-date 2026-01-01T00:00:00Z\n" +
+ "ionosctl object-storage object retention put --name my-bucket --key my-object --mode GOVERNANCE --retain-until-date 2026-01-01T00:00:00Z --bypass-governance-retention",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey, flagMode, flagRetainUntilDate)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ mode := viper.GetString(core.GetFlagName(c.NS, flagMode))
+ retainUntilDate := viper.GetString(core.GetFlagName(c.NS, flagRetainUntilDate))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+ bypassGovernance := viper.GetBool(core.GetFlagName(c.NS, flagBypassGovernanceRetention))
+
+ retReq := objectstorage.NewPutObjectRetentionRequest()
+ retReq.SetMode(mode)
+ retReq.SetRetainUntilDate(retainUntilDate)
+
+ req := client.MustObjectStorage().ObjectStorageClient.ObjectLockApi.
+ PutObjectRetention(c.Context, name, key).
+ PutObjectRetentionRequest(*retReq)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+ if bypassGovernance {
+ req = req.XAmzBypassGovernanceRetention(true)
+ }
+
+ _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Retention configuration for %q in bucket %q applied successfully\n", key, name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagMode, "", "", "Retention mode: GOVERNANCE or COMPLIANCE", core.RequiredFlagOption())
+ _ = cmd.Command.RegisterFlagCompletionFunc(flagMode, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return []string{"GOVERNANCE", "COMPLIANCE"}, cobra.ShellCompDirectiveNoFileComp
+ })
+ cmd.AddStringFlag(flagRetainUntilDate, "", "", "Date until which the object is retained (RFC 3339 format, e.g. 2026-01-01T00:00:00Z)", core.RequiredFlagOption())
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID of the object")
+ cmd.AddBoolFlag(flagBypassGovernanceRetention, "", false, "Bypass Governance-mode restrictions")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/retention/retention.go b/commands/object-storage/object/retention/retention.go
new file mode 100644
index 0000000000..2beb940d39
--- /dev/null
+++ b/commands/object-storage/object/retention/retention.go
@@ -0,0 +1,52 @@
+package retention
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+const (
+ flagKey = "key"
+ flagKeyShort = "k"
+ flagVersionId = "version-id"
+ flagMode = "mode"
+ flagRetainUntilDate = "retain-until-date"
+ flagBypassGovernanceRetention = "bypass-governance-retention"
+)
+
+var allCols = []table.Column{
+ {Name: "Mode", JSONPath: "Mode", Default: true},
+ {Name: "RetainUntilDate", JSONPath: "RetainUntilDate", Default: true},
+}
+
+type retentionInfo struct {
+ Mode string `json:"Mode"`
+ RetainUntilDate string `json:"RetainUntilDate"`
+}
+
+func Root() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "retention",
+ Aliases: []string{"ret"},
+ Short: "Manage Object Lock retention for objects",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/object/tagging/delete.go b/commands/object-storage/object/tagging/delete.go
new file mode 100644
index 0000000000..6bb34901d7
--- /dev/null
+++ b/commands/object-storage/object/tagging/delete.go
@@ -0,0 +1,63 @@
+package objecttagging
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/confirm"
+)
+
+func DeleteCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-tagging",
+ Verb: "delete",
+ Aliases: []string{"d"},
+ ShortDesc: "Delete the tagging configuration for an object",
+ Example: "ionosctl object-storage object tagging delete --name my-bucket --key my-object\nionosctl object-storage object tagging delete --name my-bucket --key my-object -f",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+
+ if !confirm.FAsk(c.Command.Command.InOrStdin(), fmt.Sprintf("delete tagging configuration for object %q in bucket %q", key, name), viper.GetBool(constants.ArgForce)) {
+ return fmt.Errorf(confirm.UserDenied)
+ }
+
+ req := client.MustObjectStorage().ObjectStorageClient.TaggingApi.DeleteObjectTagging(c.Context, name, key)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+
+ _, _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Tagging configuration for object %q in bucket %q deleted successfully\n", key, name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID of the object")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/tagging/get.go b/commands/object-storage/object/tagging/get.go
new file mode 100644
index 0000000000..6fedd2cefe
--- /dev/null
+++ b/commands/object-storage/object/tagging/get.go
@@ -0,0 +1,66 @@
+package objecttagging
+
+import (
+ "context"
+
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+func GetCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-tagging",
+ Verb: "get",
+ Aliases: []string{"g"},
+ ShortDesc: "Get the tagging configuration for an object",
+ Example: "ionosctl object-storage object tagging get --name my-bucket --key my-object",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+
+ req := client.MustObjectStorage().ObjectStorageClient.TaggingApi.GetObjectTagging(c.Context, name, key)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+
+ result, _, err := req.Execute()
+ if err != nil {
+ return err
+ }
+
+ var tags []tagInfo
+ for _, t := range result.GetTagSet() {
+ tags = append(tags, tagInfo{
+ Key: t.GetKey(),
+ Value: t.GetValue(),
+ })
+ }
+
+ cols, _ := c.Command.Command.Flags().GetStringSlice(constants.ArgCols)
+ return c.Out(table.Sprint(allCols, tags, cols))
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID of the object")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/tagging/put.go b/commands/object-storage/object/tagging/put.go
new file mode 100644
index 0000000000..53b3987432
--- /dev/null
+++ b/commands/object-storage/object/tagging/put.go
@@ -0,0 +1,94 @@
+package objecttagging
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "os"
+
+ objectstorage "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/completer"
+ "github.com/ionos-cloud/ionosctl/v6/internal/client"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+)
+
+const objectTaggingExample = `{
+ "TagSet": [
+ {"Key": "Environment", "Value": "production"},
+ {"Key": "Team", "Value": "platform"}
+ ]
+}`
+
+func PutCmd() *core.Command {
+ cmd := core.NewCommand(context.Background(), nil, core.CommandBuilder{
+ Namespace: "object-storage",
+ Resource: "object-tagging",
+ Verb: "put",
+ Aliases: []string{"p"},
+ ShortDesc: "Create or replace the tagging configuration for an object",
+ LongDesc: "Create or replace the tagging configuration for an object. " +
+ "The configuration must be provided as a path to a JSON file via --json-properties. " +
+ "Use --json-properties-example to see an example tagging configuration.",
+ Example: "ionosctl object-storage object tagging put --name my-bucket --key my-object --json-properties tags.json\n" +
+ "ionosctl object-storage object tagging put --json-properties-example",
+ PreCmdRun: func(c *core.PreCommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ return nil
+ }
+ return core.CheckRequiredFlags(c.Command, c.NS, constants.FlagName, flagKey, constants.FlagJsonProperties)
+ },
+ CmdRun: func(c *core.CommandConfig) error {
+ if viper.GetBool(core.GetFlagName(c.NS, constants.FlagJsonPropertiesExample)) {
+ fmt.Fprintln(c.Command.Command.OutOrStdout(), objectTaggingExample)
+ return nil
+ }
+
+ name := viper.GetString(core.GetFlagName(c.NS, constants.FlagName))
+ key := viper.GetString(core.GetFlagName(c.NS, flagKey))
+ versionId := viper.GetString(core.GetFlagName(c.NS, flagVersionId))
+ input := viper.GetString(core.GetFlagName(c.NS, constants.FlagJsonProperties))
+
+ data, err := os.ReadFile(input)
+ if err != nil {
+ return fmt.Errorf("reading object tagging input: %w", err)
+ }
+
+ var tagReq objectstorage.PutObjectTaggingRequest
+ if err := json.Unmarshal(data, &tagReq); err != nil {
+ return fmt.Errorf("parsing object tagging JSON: %w", err)
+ }
+
+ req := client.MustObjectStorage().ObjectStorageClient.TaggingApi.PutObjectTagging(c.Context, name, key).
+ PutObjectTaggingRequest(tagReq)
+ if versionId != "" {
+ req = req.VersionId(versionId)
+ }
+
+ _, _, err = req.Execute()
+ if err != nil {
+ return err
+ }
+
+ fmt.Fprintf(c.Command.Command.OutOrStdout(), "Tagging configuration for object %q in bucket %q applied successfully\n", key, name)
+ return nil
+ },
+ InitClient: false,
+ })
+
+ cmd.AddStringFlag(constants.FlagName, constants.FlagNameShort, "", "Name of the bucket", core.RequiredFlagOption(),
+ core.WithCompletion(completer.BucketNames, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagKey, flagKeyShort, "", "Object key", core.RequiredFlagOption(),
+ core.WithCompletion(func() []string {
+ return completer.ObjectKeys(viper.GetString(core.GetFlagName(cmd.NS, constants.FlagName)))
+ }, constants.ObjectStorageApiRegionalURL, constants.ObjectStorageLocations))
+ cmd.AddStringFlag(flagVersionId, "", "", "Version ID of the object")
+ cmd.AddStringFlag(constants.FlagJsonProperties, "", "", "Path to a JSON file containing the tagging configuration")
+ cmd.AddBoolFlag(constants.FlagJsonPropertiesExample, "", false, "Print an example tagging configuration JSON and exit")
+
+ cmd.Command.SilenceUsage = true
+ cmd.Command.Flags().SortFlags = false
+ return cmd
+}
diff --git a/commands/object-storage/object/tagging/tagging.go b/commands/object-storage/object/tagging/tagging.go
new file mode 100644
index 0000000000..5ce0d98631
--- /dev/null
+++ b/commands/object-storage/object/tagging/tagging.go
@@ -0,0 +1,50 @@
+package objecttagging
+
+import (
+ "github.com/spf13/cobra"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/ionosctl/v6/internal/printer/table"
+)
+
+const (
+ flagKey = "key"
+ flagKeyShort = "k"
+ flagVersionId = "version-id"
+)
+
+var allCols = []table.Column{
+ {Name: "Key", JSONPath: "Key", Default: true},
+ {Name: "Value", JSONPath: "Value", Default: true},
+}
+
+type tagInfo struct {
+ Key string `json:"Key"`
+ Value string `json:"Value"`
+}
+
+func ObjectTaggingCmd() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "tagging",
+ Aliases: []string{"tag"},
+ Short: "Object tagging operations for contract-owned object storage",
+ TraverseChildren: true,
+ },
+ }
+
+ cmd.Command.PersistentFlags().StringSlice(constants.ArgCols, nil, table.ColsMessage(allCols))
+ _ = cmd.Command.RegisterFlagCompletionFunc(
+ constants.ArgCols,
+ func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
+ return table.AllCols(allCols), cobra.ShellCompDirectiveNoFileComp
+ },
+ )
+
+ cmd.AddCommand(GetCmd())
+ cmd.AddCommand(PutCmd())
+ cmd.AddCommand(DeleteCmd())
+
+ return cmd
+}
diff --git a/commands/object-storage/object_storage.go b/commands/object-storage/object_storage.go
new file mode 100644
index 0000000000..ef732add5b
--- /dev/null
+++ b/commands/object-storage/object_storage.go
@@ -0,0 +1,29 @@
+package objectstorage
+
+import (
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/bucket"
+ "github.com/ionos-cloud/ionosctl/v6/commands/object-storage/object"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/internal/core"
+ "github.com/ionos-cloud/sdk-go-bundle/shared/fileconfiguration"
+ "github.com/spf13/cobra"
+)
+
+func Root() *core.Command {
+ cmd := &core.Command{
+ Command: &cobra.Command{
+ Use: "object-storage",
+ Aliases: []string{"os"},
+ Short: "Object Storage operations for contract-owned buckets",
+ TraverseChildren: true,
+ },
+ }
+ cmd.AddCommand(bucket.BucketCommand())
+ cmd.AddCommand(object.ObjectCommand())
+
+ return core.WithRegionalConfigOverride(cmd,
+ []string{fileconfiguration.ObjectStorage},
+ constants.ObjectStorageApiRegionalURL,
+ constants.ObjectStorageLocations,
+ )
+}
diff --git a/commands/root.go b/commands/root.go
index 2a38f94b53..046236fbd1 100644
--- a/commands/root.go
+++ b/commands/root.go
@@ -17,6 +17,7 @@ import (
"github.com/ionos-cloud/ionosctl/v6/commands/dbaas"
"github.com/ionos-cloud/ionosctl/v6/commands/dns"
logging_service "github.com/ionos-cloud/ionosctl/v6/commands/logging-service"
+ objectstorage "github.com/ionos-cloud/ionosctl/v6/commands/object-storage"
"github.com/ionos-cloud/ionosctl/v6/commands/token"
vm_autoscaling "github.com/ionos-cloud/ionosctl/v6/commands/vm-autoscaling"
"github.com/ionos-cloud/ionosctl/v6/commands/vpn"
@@ -231,6 +232,8 @@ func addCommands() {
rootCmd.AddCommand(vpn.Root())
rootCmd.AddCommand(kafka.Command())
+
+ rootCmd.AddCommand(objectstorage.Root())
}
const (
diff --git a/docs/subcommands/CLI Setup/whoami.md b/docs/subcommands/CLI Setup/whoami.md
index 2a53bb1847..7d1f70c694 100644
--- a/docs/subcommands/CLI Setup/whoami.md
+++ b/docs/subcommands/CLI Setup/whoami.md
@@ -46,7 +46,7 @@ Within each layer, a token takes precedence over a username and password combina
--offset int Number of items to skip before starting to collect the results
--order-by string Property to order the results by
-o, --output string Desired output format [text|json|api-json] (default "text")
- -p, --provenance If set, the command prints the layers of authentication sources, their order of priority, and which one was used. It also tells you if a token or username and password are being used for authentication.
+ -p, --provenance If set, the command prints the layers of authentication sources (including Object Storage credentials), their order of priority, and which one was used.
--query string JMESPath query string to filter the output
-q, --quiet Quiet output
-v, --verbose count Increase verbosity level [-v, -vv, -vvv]
diff --git a/docs/subcommands/Object-Storage/bucket/cors/delete.md b/docs/subcommands/Object-Storage/bucket/cors/delete.md
new file mode 100644
index 0000000000..304532430b
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/cors/delete.md
@@ -0,0 +1,60 @@
+---
+description: "Delete the CORS configuration for a bucket"
+---
+
+# ObjectStorageBucketCorsDelete
+
+## Usage
+
+```text
+ionosctl object-storage bucket cors delete [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete the CORS configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [AllowedOrigins AllowedMethods AllowedHeaders ExposeHeaders MaxAgeSeconds ID]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket cors delete --name my-bucket
+ionosctl object-storage bucket cors delete --name my-bucket -f
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/cors/get.md b/docs/subcommands/Object-Storage/bucket/cors/get.md
new file mode 100644
index 0000000000..9b17aefe60
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/cors/get.md
@@ -0,0 +1,59 @@
+---
+description: "Get the CORS configuration for a bucket"
+---
+
+# ObjectStorageBucketCorsGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket cors get [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the CORS configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [AllowedOrigins AllowedMethods AllowedHeaders ExposeHeaders MaxAgeSeconds ID]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket cors get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/cors/put.md b/docs/subcommands/Object-Storage/bucket/cors/put.md
new file mode 100644
index 0000000000..848daad9a6
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/cors/put.md
@@ -0,0 +1,62 @@
+---
+description: "Create or replace the CORS configuration for a bucket"
+---
+
+# ObjectStorageBucketCorsPut
+
+## Usage
+
+```text
+ionosctl object-storage bucket cors put [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Create or replace the CORS configuration for a bucket. The configuration must be provided as a path to a JSON file via --json-properties. Use --json-properties-example to see an example CORS configuration.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [AllowedOrigins AllowedMethods AllowedHeaders ExposeHeaders MaxAgeSeconds ID]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --json-properties string Path to a JSON file containing the CORS configuration
+ --json-properties-example Print an example CORS configuration JSON and exit
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket cors put --name my-bucket --json-properties cors.json
+ionosctl object-storage bucket cors put --json-properties-example
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/create.md b/docs/subcommands/Object-Storage/bucket/create.md
new file mode 100644
index 0000000000..e19aac250e
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/create.md
@@ -0,0 +1,68 @@
+---
+description: "Create a contract-owned bucket"
+---
+
+# ObjectStorageBucketCreate
+
+## Usage
+
+```text
+ionosctl object-storage bucket create [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `create` command:
+
+```text
+[c]
+```
+
+## Description
+
+Create a contract-owned bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Name CreationDate Region]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket to create (required)
+ --no-headers Don't print table headers when table output is used
+ --object-lock Enable Object Lock on the new bucket (cannot be changed after creation)
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket create --name my-bucket
+ionosctl object-storage bucket create --name my-bucket --location eu-central-3
+ionosctl object-storage bucket create --name my-bucket --object-lock
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/delete.md b/docs/subcommands/Object-Storage/bucket/delete.md
new file mode 100644
index 0000000000..207c368d5d
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/delete.md
@@ -0,0 +1,68 @@
+---
+description: "Delete a contract-owned bucket"
+---
+
+# ObjectStorageBucketDelete
+
+## Usage
+
+```text
+ionosctl object-storage bucket delete [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete a contract-owned bucket, or all buckets using --all. The bucket must be empty before deletion. Use 'ionosctl object-storage object delete --all' to empty a bucket first.
+
+## Options
+
+```text
+ -a, --all Delete all buckets
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Name CreationDate Region]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket to delete
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket delete --name my-bucket
+ionosctl object-storage bucket delete --all
+ionosctl object-storage bucket delete --all -f
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/encryption/delete.md b/docs/subcommands/Object-Storage/bucket/encryption/delete.md
new file mode 100644
index 0000000000..c96bd13451
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/encryption/delete.md
@@ -0,0 +1,66 @@
+---
+description: "Delete the default encryption configuration for a bucket"
+---
+
+# ObjectStorageBucketEncryptionDelete
+
+## Usage
+
+```text
+ionosctl object-storage bucket encryption delete [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `encryption` command:
+
+```text
+[enc]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete the default encryption configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [SSEAlgorithm]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket encryption delete --name my-bucket
+ionosctl object-storage bucket encryption delete --name my-bucket -f
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/encryption/get.md b/docs/subcommands/Object-Storage/bucket/encryption/get.md
new file mode 100644
index 0000000000..f560114044
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/encryption/get.md
@@ -0,0 +1,65 @@
+---
+description: "Get the default encryption configuration for a bucket"
+---
+
+# ObjectStorageBucketEncryptionGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket encryption get [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `encryption` command:
+
+```text
+[enc]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the default encryption configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [SSEAlgorithm]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket encryption get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/encryption/put.md b/docs/subcommands/Object-Storage/bucket/encryption/put.md
new file mode 100644
index 0000000000..410c892eb4
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/encryption/put.md
@@ -0,0 +1,68 @@
+---
+description: "Create or replace the default encryption configuration for a bucket"
+---
+
+# ObjectStorageBucketEncryptionPut
+
+## Usage
+
+```text
+ionosctl object-storage bucket encryption put [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `encryption` command:
+
+```text
+[enc]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Create or replace the default encryption configuration for a bucket. The configuration must be provided as a path to a JSON file via --json-properties. Use --json-properties-example to see an example encryption configuration.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [SSEAlgorithm]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --json-properties string Path to a JSON file containing the encryption configuration
+ --json-properties-example Print an example encryption configuration JSON and exit
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket encryption put --name my-bucket --json-properties encryption.json
+ionosctl object-storage bucket encryption put --json-properties-example
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/get.md b/docs/subcommands/Object-Storage/bucket/get.md
new file mode 100644
index 0000000000..d58f707b95
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/get.md
@@ -0,0 +1,65 @@
+---
+description: "Get details of a contract-owned bucket"
+---
+
+# ObjectStorageBucketGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket get [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get details of a contract-owned bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Name CreationDate Region]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket to retrieve (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/head.md b/docs/subcommands/Object-Storage/bucket/head.md
new file mode 100644
index 0000000000..62b8038c7d
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/head.md
@@ -0,0 +1,65 @@
+---
+description: "Check if a bucket exists and you have access"
+---
+
+# ObjectStorageBucketHead
+
+## Usage
+
+```text
+ionosctl object-storage bucket head [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `head` command:
+
+```text
+[hd]
+```
+
+## Description
+
+Check if a bucket exists and you have access
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Name Status Region]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket to check (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket head --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/lifecycle/delete.md b/docs/subcommands/Object-Storage/bucket/lifecycle/delete.md
new file mode 100644
index 0000000000..7e4b3c832b
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/lifecycle/delete.md
@@ -0,0 +1,66 @@
+---
+description: "Delete the lifecycle configuration for a bucket"
+---
+
+# ObjectStorageBucketLifecycleDelete
+
+## Usage
+
+```text
+ionosctl object-storage bucket lifecycle delete [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `lifecycle` command:
+
+```text
+[lc]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete the lifecycle configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [ID Prefix Status ExpirationDays ExpirationDate ExpiredObjectDeleteMarker NoncurrentDays AbortDays]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket lifecycle delete --name my-bucket
+ionosctl object-storage bucket lifecycle delete --name my-bucket -f
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/lifecycle/get.md b/docs/subcommands/Object-Storage/bucket/lifecycle/get.md
new file mode 100644
index 0000000000..fd9b5d4fb7
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/lifecycle/get.md
@@ -0,0 +1,65 @@
+---
+description: "Get the lifecycle configuration for a bucket"
+---
+
+# ObjectStorageBucketLifecycleGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket lifecycle get [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `lifecycle` command:
+
+```text
+[lc]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the lifecycle configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [ID Prefix Status ExpirationDays ExpirationDate ExpiredObjectDeleteMarker NoncurrentDays AbortDays]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket lifecycle get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/lifecycle/put.md b/docs/subcommands/Object-Storage/bucket/lifecycle/put.md
new file mode 100644
index 0000000000..da10c2b517
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/lifecycle/put.md
@@ -0,0 +1,68 @@
+---
+description: "Create or replace the lifecycle configuration for a bucket"
+---
+
+# ObjectStorageBucketLifecyclePut
+
+## Usage
+
+```text
+ionosctl object-storage bucket lifecycle put [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `lifecycle` command:
+
+```text
+[lc]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Create or replace the lifecycle configuration for a bucket. The configuration must be provided as a path to a JSON file via --json-properties. Use --json-properties-example to see an example lifecycle configuration.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [ID Prefix Status ExpirationDays ExpirationDate ExpiredObjectDeleteMarker NoncurrentDays AbortDays]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --json-properties string Path to a JSON file containing the lifecycle configuration
+ --json-properties-example Print an example lifecycle configuration JSON and exit
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket lifecycle put --name my-bucket --json-properties lifecycle.json
+ionosctl object-storage bucket lifecycle put --json-properties-example
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/list.md b/docs/subcommands/Object-Storage/bucket/list.md
new file mode 100644
index 0000000000..4db2c46587
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/list.md
@@ -0,0 +1,65 @@
+---
+description: "List all contract-owned buckets"
+---
+
+# ObjectStorageBucketList
+
+## Usage
+
+```text
+ionosctl object-storage bucket list [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `list` command:
+
+```text
+[ls]
+```
+
+## Description
+
+List all contract-owned buckets
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Name CreationDate Region]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket list
+ionosctl object-storage bucket list --location eu-central-3
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/object/lock/get.md b/docs/subcommands/Object-Storage/bucket/object/lock/get.md
new file mode 100644
index 0000000000..3be5e1e5ab
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/object/lock/get.md
@@ -0,0 +1,65 @@
+---
+description: "Get the Object Lock configuration for a bucket"
+---
+
+# ObjectStorageBucketObjectLockGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket object-lock get [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `object-lock` command:
+
+```text
+[ol]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the Object Lock configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [ObjectLockEnabled RetentionMode RetentionDays RetentionYears]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket object-lock get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/object/lock/put.md b/docs/subcommands/Object-Storage/bucket/object/lock/put.md
new file mode 100644
index 0000000000..a64eae5f8a
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/object/lock/put.md
@@ -0,0 +1,69 @@
+---
+description: "Apply an Object Lock configuration to a bucket"
+---
+
+# ObjectStorageBucketObjectLockPut
+
+## Usage
+
+```text
+ionosctl object-storage bucket object-lock put [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `object-lock` command:
+
+```text
+[ol]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Apply an Object Lock configuration to a bucket. The bucket must have been created with --object-lock enabled. Specify a default retention mode (GOVERNANCE or COMPLIANCE) and period (--days or --years, but not both).
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [ObjectLockEnabled RetentionMode RetentionDays RetentionYears]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ --days int32 Default retention period in days (mutually exclusive with --years)
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ --mode string Default retention mode: GOVERNANCE or COMPLIANCE (required)
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --years int32 Default retention period in years (mutually exclusive with --days)
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket object-lock put --name my-bucket --mode GOVERNANCE --days 30
+ionosctl object-storage bucket object-lock put --name my-bucket --mode COMPLIANCE --years 1
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/policy/delete.md b/docs/subcommands/Object-Storage/bucket/policy/delete.md
new file mode 100644
index 0000000000..9cedc23e31
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/policy/delete.md
@@ -0,0 +1,66 @@
+---
+description: "Delete the bucket policy"
+---
+
+# ObjectStorageBucketPolicyDelete
+
+## Usage
+
+```text
+ionosctl object-storage bucket policy delete [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `policy` command:
+
+```text
+[pol]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete the bucket policy
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Sid Effect Action Resource Principal Condition]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket policy delete --name my-bucket
+ionosctl object-storage bucket policy delete --name my-bucket -f
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/policy/get.md b/docs/subcommands/Object-Storage/bucket/policy/get.md
new file mode 100644
index 0000000000..e9cc8fab1f
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/policy/get.md
@@ -0,0 +1,65 @@
+---
+description: "Get the bucket policy"
+---
+
+# ObjectStorageBucketPolicyGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket policy get [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `policy` command:
+
+```text
+[pol]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the bucket policy
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Sid Effect Action Resource Principal Condition]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket policy get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/policy/put.md b/docs/subcommands/Object-Storage/bucket/policy/put.md
new file mode 100644
index 0000000000..cecebadf31
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/policy/put.md
@@ -0,0 +1,68 @@
+---
+description: "Create or replace the bucket policy"
+---
+
+# ObjectStorageBucketPolicyPut
+
+## Usage
+
+```text
+ionosctl object-storage bucket policy put [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `policy` command:
+
+```text
+[pol]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Create or replace the bucket policy. The policy must be provided as a path to a JSON file via --json-properties. Use --json-properties-example to see an example policy.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Sid Effect Action Resource Principal Condition]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --json-properties string Path to a JSON file containing the bucket policy
+ --json-properties-example Print an example bucket policy JSON and exit
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket policy put --name my-bucket --json-properties policy.json
+ionosctl object-storage bucket policy put --json-properties-example
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/policy/status.md b/docs/subcommands/Object-Storage/bucket/policy/status.md
new file mode 100644
index 0000000000..21e67e21c0
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/policy/status.md
@@ -0,0 +1,65 @@
+---
+description: "Check if a bucket policy makes the bucket public"
+---
+
+# ObjectStorageBucketPolicyStatus
+
+## Usage
+
+```text
+ionosctl object-storage bucket policy status [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `policy` command:
+
+```text
+[pol]
+```
+
+For `status` command:
+
+```text
+[s]
+```
+
+## Description
+
+Check if a bucket policy makes the bucket public
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Bucket IsPublic]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket policy status --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/public/access/block/delete.md b/docs/subcommands/Object-Storage/bucket/public/access/block/delete.md
new file mode 100644
index 0000000000..bea3e83021
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/public/access/block/delete.md
@@ -0,0 +1,66 @@
+---
+description: "Delete the public access block configuration for a bucket"
+---
+
+# ObjectStorageBucketPublicAccessBlockDelete
+
+## Usage
+
+```text
+ionosctl object-storage bucket public-access-block delete [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `public-access-block` command:
+
+```text
+[pab]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete the public access block configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [BlockPublicAcls IgnorePublicAcls BlockPublicPolicy RestrictPublicBuckets]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket public-access-block delete --name my-bucket
+ionosctl object-storage bucket public-access-block delete --name my-bucket -f
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/public/access/block/get.md b/docs/subcommands/Object-Storage/bucket/public/access/block/get.md
new file mode 100644
index 0000000000..d8fcc20da6
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/public/access/block/get.md
@@ -0,0 +1,65 @@
+---
+description: "Get the public access block configuration for a bucket"
+---
+
+# ObjectStorageBucketPublicAccessBlockGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket public-access-block get [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `public-access-block` command:
+
+```text
+[pab]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the public access block configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [BlockPublicAcls IgnorePublicAcls BlockPublicPolicy RestrictPublicBuckets]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket public-access-block get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/public/access/block/put.md b/docs/subcommands/Object-Storage/bucket/public/access/block/put.md
new file mode 100644
index 0000000000..2afb81f5ae
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/public/access/block/put.md
@@ -0,0 +1,68 @@
+---
+description: "Create or replace the public access block configuration for a bucket"
+---
+
+# ObjectStorageBucketPublicAccessBlockPut
+
+## Usage
+
+```text
+ionosctl object-storage bucket public-access-block put [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `public-access-block` command:
+
+```text
+[pab]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Create or replace the public access block configuration for a bucket. The configuration must be provided as a path to a JSON file via --json-properties. Use --json-properties-example to see an example public access block configuration.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [BlockPublicAcls IgnorePublicAcls BlockPublicPolicy RestrictPublicBuckets]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --json-properties string Path to a JSON file containing the public access block configuration
+ --json-properties-example Print an example public access block configuration JSON and exit
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket public-access-block put --name my-bucket --json-properties config.json
+ionosctl object-storage bucket public-access-block put --json-properties-example
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/tagging/delete.md b/docs/subcommands/Object-Storage/bucket/tagging/delete.md
new file mode 100644
index 0000000000..881778f861
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/tagging/delete.md
@@ -0,0 +1,66 @@
+---
+description: "Delete the tagging configuration for a bucket"
+---
+
+# ObjectStorageBucketTaggingDelete
+
+## Usage
+
+```text
+ionosctl object-storage bucket tagging delete [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `tagging` command:
+
+```text
+[tag]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete the tagging configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key Value]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket tagging delete --name my-bucket
+ionosctl object-storage bucket tagging delete --name my-bucket -f
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/tagging/get.md b/docs/subcommands/Object-Storage/bucket/tagging/get.md
new file mode 100644
index 0000000000..6ed76332c7
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/tagging/get.md
@@ -0,0 +1,65 @@
+---
+description: "Get the tagging configuration for a bucket"
+---
+
+# ObjectStorageBucketTaggingGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket tagging get [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `tagging` command:
+
+```text
+[tag]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the tagging configuration for a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key Value]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket tagging get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/tagging/put.md b/docs/subcommands/Object-Storage/bucket/tagging/put.md
new file mode 100644
index 0000000000..e2cdd700dd
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/tagging/put.md
@@ -0,0 +1,68 @@
+---
+description: "Create or replace the tagging configuration for a bucket"
+---
+
+# ObjectStorageBucketTaggingPut
+
+## Usage
+
+```text
+ionosctl object-storage bucket tagging put [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `tagging` command:
+
+```text
+[tag]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Create or replace the tagging configuration for a bucket. The configuration must be provided as a path to a JSON file via --json-properties. Use --json-properties-example to see an example tagging configuration.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key Value]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --json-properties string Path to a JSON file containing the tagging configuration
+ --json-properties-example Print an example tagging configuration JSON and exit
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket tagging put --name my-bucket --json-properties tags.json
+ionosctl object-storage bucket tagging put --json-properties-example
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/versioning/get.md b/docs/subcommands/Object-Storage/bucket/versioning/get.md
new file mode 100644
index 0000000000..5506b9ba04
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/versioning/get.md
@@ -0,0 +1,65 @@
+---
+description: "Get the versioning state of a bucket"
+---
+
+# ObjectStorageBucketVersioningGet
+
+## Usage
+
+```text
+ionosctl object-storage bucket versioning get [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `versioning` command:
+
+```text
+[ver]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the versioning state of a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Name Versioning]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket versioning get --name my-bucket
+```
+
diff --git a/docs/subcommands/Object-Storage/bucket/versioning/set.md b/docs/subcommands/Object-Storage/bucket/versioning/set.md
new file mode 100644
index 0000000000..22dd21b2ef
--- /dev/null
+++ b/docs/subcommands/Object-Storage/bucket/versioning/set.md
@@ -0,0 +1,67 @@
+---
+description: "Enable or suspend versioning on a bucket"
+---
+
+# ObjectStorageBucketVersioningSet
+
+## Usage
+
+```text
+ionosctl object-storage bucket versioning set [flags]
+```
+
+## Aliases
+
+For `bucket` command:
+
+```text
+[b]
+```
+
+For `versioning` command:
+
+```text
+[ver]
+```
+
+For `set` command:
+
+```text
+[s]
+```
+
+## Description
+
+Enable or suspend versioning on a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Name Versioning]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ --status string Versioning status: Enabled or Suspended (required)
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage bucket versioning set --name my-bucket --status Enabled
+ionosctl object-storage bucket versioning set --name my-bucket --status Suspended
+```
+
diff --git a/docs/subcommands/Object-Storage/object/copy.md b/docs/subcommands/Object-Storage/object/copy.md
new file mode 100644
index 0000000000..86e0e3a8b5
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/copy.md
@@ -0,0 +1,67 @@
+---
+description: "Copy an object"
+---
+
+# ObjectStorageObjectCopy
+
+## Usage
+
+```text
+ionosctl object-storage object copy [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `copy` command:
+
+```text
+[cp]
+```
+
+## Description
+
+Copy an object within or between buckets. The --copy-source must be in the format /source-bucket/source-key.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [ETag LastModified]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ --copy-source string Source object in format /source-bucket/source-key (required)
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Destination object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Destination bucket name (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage object copy --name dest-bucket --key dest-key --copy-source /source-bucket/source-key
+```
+
diff --git a/docs/subcommands/Object-Storage/object/delete.md b/docs/subcommands/Object-Storage/object/delete.md
new file mode 100644
index 0000000000..a1cb957442
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/delete.md
@@ -0,0 +1,72 @@
+---
+description: "Delete an object or all objects from a bucket"
+---
+
+# ObjectStorageObjectDelete
+
+## Usage
+
+```text
+ionosctl object-storage object delete [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete a single object by key, or all objects (including versions and delete markers) from a bucket using --all.
+
+## Options
+
+```text
+ -a, --all Delete all objects in the bucket
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --bypass-governance-retention Bypass Governance-mode Object Lock restrictions to delete the object
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key ContentType ContentLength LastModified ETag]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key to delete
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID to delete a specific version
+```
+
+## Examples
+
+```text
+ionosctl object-storage object delete --name my-bucket --key photos/image.jpg
+ionosctl object-storage object delete --name my-bucket --key photos/image.jpg --version-id abc123 -f
+ionosctl object-storage object delete --name my-bucket --all -f
+ionosctl object-storage object delete --name my-bucket --all --bypass-governance-retention -f
+```
+
diff --git a/docs/subcommands/Object-Storage/object/get.md b/docs/subcommands/Object-Storage/object/get.md
new file mode 100644
index 0000000000..cc277656f8
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/get.md
@@ -0,0 +1,69 @@
+---
+description: "Download an object to a file"
+---
+
+# ObjectStorageObjectGet
+
+## Usage
+
+```text
+ionosctl object-storage object get [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Download an object to a file
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key ContentType ContentLength LastModified ETag]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -d, --destination string Local file path for download (defaults to the basename of the key)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key to download (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID of the object to download
+```
+
+## Examples
+
+```text
+ionosctl object-storage object get --name my-bucket --key photos/image.jpg
+ionosctl object-storage object get --name my-bucket --key photos/image.jpg --destination ./local-image.jpg
+```
+
diff --git a/docs/subcommands/Object-Storage/object/head.md b/docs/subcommands/Object-Storage/object/head.md
new file mode 100644
index 0000000000..422ff24a6b
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/head.md
@@ -0,0 +1,66 @@
+---
+description: "Get object metadata"
+---
+
+# ObjectStorageObjectHead
+
+## Usage
+
+```text
+ionosctl object-storage object head [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `head` command:
+
+```text
+[hd]
+```
+
+## Description
+
+Get object metadata
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key ContentType ContentLength LastModified ETag]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage object head --name my-bucket --key photos/image.jpg
+```
+
diff --git a/docs/subcommands/Object-Storage/object/legal/hold/get.md b/docs/subcommands/Object-Storage/object/legal/hold/get.md
new file mode 100644
index 0000000000..e98b8ba7ab
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/legal/hold/get.md
@@ -0,0 +1,67 @@
+---
+description: "Get the legal hold status of an object"
+---
+
+# ObjectStorageObjectLegalHoldGet
+
+## Usage
+
+```text
+ionosctl object-storage object legal-hold get [flags]
+```
+
+## Aliases
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `legal-hold` command:
+
+```text
+[lh]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the legal hold status of an object
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Status]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID of the object
+```
+
+## Examples
+
+```text
+ionosctl object-storage object legal-hold get --name my-bucket --key my-object
+```
+
diff --git a/docs/subcommands/Object-Storage/object/legal/hold/put.md b/docs/subcommands/Object-Storage/object/legal/hold/put.md
new file mode 100644
index 0000000000..a497a4e7a8
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/legal/hold/put.md
@@ -0,0 +1,69 @@
+---
+description: "Apply or remove a legal hold on an object"
+---
+
+# ObjectStorageObjectLegalHoldPut
+
+## Usage
+
+```text
+ionosctl object-storage object legal-hold put [flags]
+```
+
+## Aliases
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `legal-hold` command:
+
+```text
+[lh]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Apply or remove a legal hold configuration on an object. Requires the bucket to have been created with Object Lock enabled.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Status]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ --status string Legal hold status: ON or OFF (required)
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID of the object
+```
+
+## Examples
+
+```text
+ionosctl object-storage object legal-hold put --name my-bucket --key my-object --status ON
+ionosctl object-storage object legal-hold put --name my-bucket --key my-object --status OFF
+```
+
diff --git a/docs/subcommands/Object-Storage/object/list.md b/docs/subcommands/Object-Storage/object/list.md
new file mode 100644
index 0000000000..8f9c9b49c6
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/list.md
@@ -0,0 +1,68 @@
+---
+description: "List objects in a bucket"
+---
+
+# ObjectStorageObjectList
+
+## Usage
+
+```text
+ionosctl object-storage object list [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `list` command:
+
+```text
+[l ls]
+```
+
+## Description
+
+List objects in a bucket
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key Size LastModified StorageClass ETag]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ --max-keys int32 Maximum number of objects to return (0 for no limit) (default 1000)
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ -p, --prefix string Filter objects by key prefix (e.g. photos/)
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage object list --name my-bucket
+ionosctl object-storage object list --name my-bucket --prefix photos/ --max-keys 100
+```
+
diff --git a/docs/subcommands/Object-Storage/object/put.md b/docs/subcommands/Object-Storage/object/put.md
new file mode 100644
index 0000000000..6065d2183a
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/put.md
@@ -0,0 +1,68 @@
+---
+description: "Upload a file as an object"
+---
+
+# ObjectStorageObjectPut
+
+## Usage
+
+```text
+ionosctl object-storage object put [flags]
+```
+
+## Aliases
+
+For `object-storage` command:
+
+```text
+[os]
+```
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Upload a file as an object
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key ContentType ContentLength LastModified ETag]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ --content-type string MIME type of the object (auto-detected from file extension if omitted)
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key (path in the bucket) (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -s, --source string Path to the local file to upload (required)
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+```
+
+## Examples
+
+```text
+ionosctl object-storage object put --name my-bucket --key photos/image.jpg --source ./image.jpg
+```
+
diff --git a/docs/subcommands/Object-Storage/object/retention/get.md b/docs/subcommands/Object-Storage/object/retention/get.md
new file mode 100644
index 0000000000..27a1a7c357
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/retention/get.md
@@ -0,0 +1,67 @@
+---
+description: "Get the Object Lock retention configuration for an object"
+---
+
+# ObjectStorageObjectRetentionGet
+
+## Usage
+
+```text
+ionosctl object-storage object retention get [flags]
+```
+
+## Aliases
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `retention` command:
+
+```text
+[ret]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the Object Lock retention configuration for an object
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Mode RetainUntilDate]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID of the object
+```
+
+## Examples
+
+```text
+ionosctl object-storage object retention get --name my-bucket --key my-object
+```
+
diff --git a/docs/subcommands/Object-Storage/object/retention/put.md b/docs/subcommands/Object-Storage/object/retention/put.md
new file mode 100644
index 0000000000..9f80a26193
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/retention/put.md
@@ -0,0 +1,71 @@
+---
+description: "Apply a retention configuration to an object"
+---
+
+# ObjectStorageObjectRetentionPut
+
+## Usage
+
+```text
+ionosctl object-storage object retention put [flags]
+```
+
+## Aliases
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `retention` command:
+
+```text
+[ret]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Place an Object Lock retention configuration on an object. Requires the bucket to have been created with Object Lock enabled.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --bypass-governance-retention Bypass Governance-mode restrictions
+ --cols strings Set of columns to be printed on output
+ Available columns: [Mode RetainUntilDate]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ --mode string Retention mode: GOVERNANCE or COMPLIANCE (required)
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ --retain-until-date string Date until which the object is retained (RFC 3339 format, e.g. 2026-01-01T00:00:00Z) (required)
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID of the object
+```
+
+## Examples
+
+```text
+ionosctl object-storage object retention put --name my-bucket --key my-object --mode GOVERNANCE --retain-until-date 2026-01-01T00:00:00Z
+ionosctl object-storage object retention put --name my-bucket --key my-object --mode GOVERNANCE --retain-until-date 2026-01-01T00:00:00Z --bypass-governance-retention
+```
+
diff --git a/docs/subcommands/Object-Storage/object/tagging/delete.md b/docs/subcommands/Object-Storage/object/tagging/delete.md
new file mode 100644
index 0000000000..b6d7f3b5d5
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/tagging/delete.md
@@ -0,0 +1,68 @@
+---
+description: "Delete the tagging configuration for an object"
+---
+
+# ObjectStorageObjectTaggingDelete
+
+## Usage
+
+```text
+ionosctl object-storage object tagging delete [flags]
+```
+
+## Aliases
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `tagging` command:
+
+```text
+[tag]
+```
+
+For `delete` command:
+
+```text
+[d]
+```
+
+## Description
+
+Delete the tagging configuration for an object
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key Value]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID of the object
+```
+
+## Examples
+
+```text
+ionosctl object-storage object tagging delete --name my-bucket --key my-object
+ionosctl object-storage object tagging delete --name my-bucket --key my-object -f
+```
+
diff --git a/docs/subcommands/Object-Storage/object/tagging/get.md b/docs/subcommands/Object-Storage/object/tagging/get.md
new file mode 100644
index 0000000000..0afd377cf1
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/tagging/get.md
@@ -0,0 +1,67 @@
+---
+description: "Get the tagging configuration for an object"
+---
+
+# ObjectStorageObjectTaggingGet
+
+## Usage
+
+```text
+ionosctl object-storage object tagging get [flags]
+```
+
+## Aliases
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `tagging` command:
+
+```text
+[tag]
+```
+
+For `get` command:
+
+```text
+[g]
+```
+
+## Description
+
+Get the tagging configuration for an object
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key Value]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ -k, --key string Object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID of the object
+```
+
+## Examples
+
+```text
+ionosctl object-storage object tagging get --name my-bucket --key my-object
+```
+
diff --git a/docs/subcommands/Object-Storage/object/tagging/put.md b/docs/subcommands/Object-Storage/object/tagging/put.md
new file mode 100644
index 0000000000..c50e932053
--- /dev/null
+++ b/docs/subcommands/Object-Storage/object/tagging/put.md
@@ -0,0 +1,70 @@
+---
+description: "Create or replace the tagging configuration for an object"
+---
+
+# ObjectStorageObjectTaggingPut
+
+## Usage
+
+```text
+ionosctl object-storage object tagging put [flags]
+```
+
+## Aliases
+
+For `object` command:
+
+```text
+[obj]
+```
+
+For `tagging` command:
+
+```text
+[tag]
+```
+
+For `put` command:
+
+```text
+[p]
+```
+
+## Description
+
+Create or replace the tagging configuration for an object. The configuration must be provided as a path to a JSON file via --json-properties. Use --json-properties-example to see an example tagging configuration.
+
+## Options
+
+```text
+ -u, --api-url string Override default host URL. If contains placeholder, location will be embedded. Preferred over the config file override 'objectstorage' and env var 'IONOS_API_URL' (default "https://s3.%s.ionoscloud.com")
+ --cols strings Set of columns to be printed on output
+ Available columns: [Key Value]
+ -c, --config string Configuration file used for authentication (default "$XDG_CONFIG_HOME/ionosctl/config.yaml")
+ -D, --depth int Level of detail for response objects (default 1)
+ -F, --filters strings Limit results to results containing the specified filter:KEY1=VALUE1,KEY2=VALUE2
+ -f, --force Force command to execute without user input
+ -h, --help Print usage
+ --json-properties string Path to a JSON file containing the tagging configuration
+ --json-properties-example Print an example tagging configuration JSON and exit
+ -k, --key string Object key (required)
+ --limit int Maximum number of items to return per request (default 50)
+ -l, --location string Location of the resource to operate on. Can be one of: eu-central-3, eu-central-4, us-central-1 (default "eu-central-3")
+ -n, --name string Name of the bucket (required)
+ --no-headers Don't print table headers when table output is used
+ --offset int Number of items to skip before starting to collect the results
+ --order-by string Property to order the results by
+ -o, --output string Desired output format [text|json|api-json] (default "text")
+ --query string JMESPath query string to filter the output
+ -q, --quiet Quiet output
+ -v, --verbose count Increase verbosity level [-v, -vv, -vvv]
+ --version-id string Version ID of the object
+```
+
+## Examples
+
+```text
+ionosctl object-storage object tagging put --name my-bucket --key my-object --json-properties tags.json
+ionosctl object-storage object tagging put --json-properties-example
+```
+
diff --git a/docs/summary.md b/docs/summary.md
index c3c8a256b7..af9d4d1223 100644
--- a/docs/summary.md
+++ b/docs/summary.md
@@ -523,6 +523,65 @@
* [remove](subcommands%2FNetwork-Load-Balancer%2Frule%2Ftarget%2Fremove.md)
* [update](subcommands%2FNetwork-Load-Balancer%2Frule%2Fupdate.md)
* [update](subcommands%2FNetwork-Load-Balancer%2Fupdate.md)
+* Object Storage
+ * bucket
+ * cors
+ * [delete](subcommands%2FObject-Storage%2Fbucket%2Fcors%2Fdelete.md)
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Fcors%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fbucket%2Fcors%2Fput.md)
+ * [create](subcommands%2FObject-Storage%2Fbucket%2Fcreate.md)
+ * [delete](subcommands%2FObject-Storage%2Fbucket%2Fdelete.md)
+ * encryption
+ * [delete](subcommands%2FObject-Storage%2Fbucket%2Fencryption%2Fdelete.md)
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Fencryption%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fbucket%2Fencryption%2Fput.md)
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Fget.md)
+ * [head](subcommands%2FObject-Storage%2Fbucket%2Fhead.md)
+ * lifecycle
+ * [delete](subcommands%2FObject-Storage%2Fbucket%2Flifecycle%2Fdelete.md)
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Flifecycle%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fbucket%2Flifecycle%2Fput.md)
+ * [list](subcommands%2FObject-Storage%2Fbucket%2Flist.md)
+ * object
+ * lock
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Fobject%2Flock%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fbucket%2Fobject%2Flock%2Fput.md)
+ * policy
+ * [delete](subcommands%2FObject-Storage%2Fbucket%2Fpolicy%2Fdelete.md)
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Fpolicy%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fbucket%2Fpolicy%2Fput.md)
+ * [status](subcommands%2FObject-Storage%2Fbucket%2Fpolicy%2Fstatus.md)
+ * public
+ * access
+ * block
+ * [delete](subcommands%2FObject-Storage%2Fbucket%2Fpublic%2Faccess%2Fblock%2Fdelete.md)
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Fpublic%2Faccess%2Fblock%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fbucket%2Fpublic%2Faccess%2Fblock%2Fput.md)
+ * tagging
+ * [delete](subcommands%2FObject-Storage%2Fbucket%2Ftagging%2Fdelete.md)
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Ftagging%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fbucket%2Ftagging%2Fput.md)
+ * versioning
+ * [get](subcommands%2FObject-Storage%2Fbucket%2Fversioning%2Fget.md)
+ * [set](subcommands%2FObject-Storage%2Fbucket%2Fversioning%2Fset.md)
+ * object
+ * [copy](subcommands%2FObject-Storage%2Fobject%2Fcopy.md)
+ * [delete](subcommands%2FObject-Storage%2Fobject%2Fdelete.md)
+ * [get](subcommands%2FObject-Storage%2Fobject%2Fget.md)
+ * [head](subcommands%2FObject-Storage%2Fobject%2Fhead.md)
+ * legal
+ * hold
+ * [get](subcommands%2FObject-Storage%2Fobject%2Flegal%2Fhold%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fobject%2Flegal%2Fhold%2Fput.md)
+ * [list](subcommands%2FObject-Storage%2Fobject%2Flist.md)
+ * [put](subcommands%2FObject-Storage%2Fobject%2Fput.md)
+ * retention
+ * [get](subcommands%2FObject-Storage%2Fobject%2Fretention%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fobject%2Fretention%2Fput.md)
+ * tagging
+ * [delete](subcommands%2FObject-Storage%2Fobject%2Ftagging%2Fdelete.md)
+ * [get](subcommands%2FObject-Storage%2Fobject%2Ftagging%2Fget.md)
+ * [put](subcommands%2FObject-Storage%2Fobject%2Ftagging%2Fput.md)
* User Management
* [create](subcommands%2FUser-Management%2Fcreate.md)
* [delete](subcommands%2FUser-Management%2Fdelete.md)
diff --git a/go.mod b/go.mod
index e47070bfa9..5f58a9e585 100644
--- a/go.mod
+++ b/go.mod
@@ -23,6 +23,7 @@ require (
github.com/ionos-cloud/sdk-go-bundle/products/kafka/v2 v2.1.0
github.com/ionos-cloud/sdk-go-bundle/products/logging/v2 v2.2.0
github.com/ionos-cloud/sdk-go-bundle/products/monitoring/v2 v2.0.2
+ github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2 v2.0.3
github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2 v2.0.3
github.com/ionos-cloud/sdk-go-bundle/shared v0.1.9
github.com/ionos-cloud/sdk-go-cert-manager v1.3.0
diff --git a/go.sum b/go.sum
index 2f55dd01c2..fc0285b649 100644
--- a/go.sum
+++ b/go.sum
@@ -180,6 +180,8 @@ github.com/ionos-cloud/sdk-go-bundle/products/logging/v2 v2.2.0 h1:SyqfL5W7Ora2G
github.com/ionos-cloud/sdk-go-bundle/products/logging/v2 v2.2.0/go.mod h1:NbpqnqfYM/+mlelgB5bokwjynZUteYrbBp+/cCAGqTM=
github.com/ionos-cloud/sdk-go-bundle/products/monitoring/v2 v2.0.2 h1:E+jxJXMZcaLfUtYuMVZlNyu9eOi9RQLm/z35Zv8YYqk=
github.com/ionos-cloud/sdk-go-bundle/products/monitoring/v2 v2.0.2/go.mod h1:TXKDPeSAl2M4wTgetbck1n9HAcf9++WEeBRFimfKXAM=
+github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2 v2.0.3 h1:NayHW5MbK6Jc/YSZBfmWr8l1peODl9PB9/8Qx+nLXYE=
+github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2 v2.0.3/go.mod h1:maNL5eH5RvnoBQcXn8CNtbAanEEoRqn7BX7ZsKHNksI=
github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2 v2.0.3 h1:Hp3nBL6VAhfsKWPte28bDJ2ZUvKcSHOgA5VZoCJIuJE=
github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2 v2.0.3/go.mod h1:V6WHbWsQDlZsLtHqgsXO81Z9eJBsczE3Q6VY8J+rutc=
github.com/ionos-cloud/sdk-go-bundle/shared v0.1.9 h1:Nn7kr05qaoISHSkHULznSnA4IPhIK2FRdYWToKEwsx8=
diff --git a/internal/client/builder.go b/internal/client/builder.go
index 780b542480..d030a244db 100644
--- a/internal/client/builder.go
+++ b/internal/client/builder.go
@@ -7,7 +7,6 @@ import (
"slices"
"strings"
- "github.com/ionos-cloud/ionosctl/v6/internal/constants"
"github.com/ionos-cloud/sdk-go-bundle/products/auth/v2"
"github.com/ionos-cloud/sdk-go-bundle/products/cdn/v2"
"github.com/ionos-cloud/sdk-go-bundle/products/cert/v2"
@@ -26,6 +25,8 @@ import (
vmasc "github.com/ionos-cloud/sdk-go-vm-autoscaling"
cloudv6 "github.com/ionos-cloud/sdk-go/v6"
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+
"github.com/spf13/viper"
)
diff --git a/internal/client/getters.go b/internal/client/getters.go
index 7af0c6a83d..55faad15cf 100644
--- a/internal/client/getters.go
+++ b/internal/client/getters.go
@@ -6,9 +6,10 @@ import (
"os"
"sync"
+ "github.com/spf13/viper"
+
"github.com/ionos-cloud/ionosctl/v6/internal/constants"
"github.com/ionos-cloud/ionosctl/v6/pkg/die"
- "github.com/spf13/viper"
)
var (
@@ -19,7 +20,7 @@ var (
func Get() (*Client, error) {
desiredURL := viper.GetString(constants.ArgServerUrl)
- // in certain situations, the viper fallback isnt considered, so we do it manually here
+ // in certain situations, the viper fallback isn't considered, so we do it manually here
if desiredURL == "" || desiredURL == constants.DefaultApiURL {
envUrl := viper.GetString(constants.EnvServerUrl)
if envUrl != "" {
diff --git a/internal/client/objectstorageclient.go b/internal/client/objectstorageclient.go
new file mode 100644
index 0000000000..f8adf407e3
--- /dev/null
+++ b/internal/client/objectstorageclient.go
@@ -0,0 +1,168 @@
+package client
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "regexp"
+ "strings"
+ "sync"
+
+ "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
+ "github.com/ionos-cloud/ionosctl/v6/pkg/die"
+)
+
+// ownerIDFixTransport wraps an http.RoundTripper to rewrite non-numeric
+// ... values inside elements to "0". This works around
+// the SDK defining Owner.ID as *int32 while the Object Storage API can return
+// "anonymous" as the owner ID.
+type ownerIDFixTransport struct {
+ base http.RoundTripper
+}
+
+var ownerIDRe = regexp.MustCompile(`(\s*)[^<]*(\D)[^<]*()`)
+
+func (t *ownerIDFixTransport) RoundTrip(req *http.Request) (*http.Response, error) {
+ base := t.base
+ if base == nil {
+ base = http.DefaultTransport
+ }
+
+ resp, err := base.RoundTrip(req)
+ if err != nil || resp.Body == nil {
+ return resp, err
+ }
+
+ // Only rewrite XML responses (listing/metadata). Leave object data
+ // (downloads, etc.) untouched to preserve streaming and avoid buffering
+ // potentially large payloads into memory.
+ ct := resp.Header.Get("Content-Type")
+ if !strings.Contains(ct, "xml") {
+ return resp, nil
+ }
+
+ body, err := io.ReadAll(resp.Body)
+ resp.Body.Close()
+ if err != nil {
+ return nil, err
+ }
+
+ body = ownerIDRe.ReplaceAll(body, []byte("${1}0${3}"))
+
+ resp.Body = io.NopCloser(bytes.NewReader(body))
+ resp.ContentLength = int64(len(body))
+ return resp, nil
+}
+
+var (
+ osOnce sync.Once
+ osInstance *ObjectStorageClient
+ osClientErr error
+)
+
+// ResolveObjectStorageCredentials resolves Object Storage access and secret keys, tracking their source.
+// Both keys must come from the same source; mixing is not allowed. Priority order:
+// 1. Environment variables IONOS_S3_ACCESS_KEY / IONOS_S3_SECRET_KEY (both must be set)
+// 2. s3AccessKey / s3SecretKey in the current ionosctl config profile (both must be set)
+func ResolveObjectStorageCredentials() (accessKey, secretKey string, akSrc ObjectStorageAccessKeySource, skSrc ObjectStorageSecretKeySource, err error) {
+ // Priority 1: both from environment variables
+ envAccessKey := os.Getenv(shared.IonosS3AccessKeyEnvVar)
+ envSecretKey := os.Getenv(shared.IonosS3SecretKeyEnvVar)
+ if envAccessKey != "" && envSecretKey != "" {
+ return envAccessKey, envSecretKey, ObjectStorageAccessKeyEnv, ObjectStorageSecretKeyEnv, nil
+ }
+
+ // Priority 2: both from config file
+ src, cfgErr := retrieveConfigFile()
+ if cfgErr != nil {
+ return "", "", ObjectStorageAccessKeyNone, ObjectStorageSecretKeyNone,
+ fmt.Errorf("failed to retrieve config file: %w", cfgErr)
+ }
+ if src.Config != nil && src.Config.GetCurrentProfile() != nil {
+ creds := src.Config.GetCurrentProfile().Credentials
+ if creds.S3AccessKey != "" && creds.S3SecretKey != "" {
+ return creds.S3AccessKey, creds.S3SecretKey, ObjectStorageAccessKeyCfg, ObjectStorageSecretKeyCfg, nil
+ }
+ }
+
+ return "", "", ObjectStorageAccessKeyNone, ObjectStorageSecretKeyNone, fmt.Errorf(
+ "object storage credentials not found. Set %s and %s environment variables, or configure s3AccessKey/s3SecretKey in your ionosctl profile",
+ shared.IonosS3AccessKeyEnvVar, shared.IonosS3SecretKeyEnvVar,
+ )
+}
+
+// newObjectStorageClient builds a new ObjectStorageClient for the given endpoint.
+func newObjectStorageClient(endpoint, region string) (*ObjectStorageClient, error) {
+ accessKey, secretKey, akSrc, skSrc, err := ResolveObjectStorageCredentials()
+ if err != nil {
+ return nil, err
+ }
+
+ opts := shared.ClientOptions{
+ Endpoint: endpoint,
+ ObjectStorageRegion: region,
+ Credentials: shared.Credentials{
+ S3AccessKey: accessKey,
+ S3SecretKey: secretKey,
+ },
+ }
+ cfg := shared.NewConfigurationFromOptions(opts).WithObjectStorage(opts)
+
+ // Wrap the transport to fix non-numeric Owner IDs from the Object Storage API.
+ cfg.HTTPClient.Transport = &ownerIDFixTransport{base: cfg.HTTPClient.Transport}
+
+ return &ObjectStorageClient{
+ AccessKeySource: akSrc,
+ SecretKeySource: skSrc,
+ URLOverride: endpoint,
+ Region: region,
+ ObjectStorageClient: objectstorage.NewAPIClient(cfg),
+ }, nil
+}
+
+// GetObjectStorage returns the ObjectStorageClient for the currently resolved endpoint.
+// The endpoint is set by WithRegionalConfigOverride via viper (constants.ArgServerUrl).
+// Falls back to the default region endpoint if not set. Cached via sync.Once.
+func GetObjectStorage() (*ObjectStorageClient, error) {
+ osOnce.Do(func() {
+ endpoint := viper.GetString(constants.ArgServerUrl)
+ region := viper.GetString(constants.FlagLocation)
+
+ if endpoint == "" {
+ if region == "" {
+ region = constants.ObjectStorageLocations[0]
+ }
+ endpoint = fmt.Sprintf(constants.ObjectStorageApiRegionalURL, region)
+ }
+
+ osInstance, osClientErr = newObjectStorageClient(endpoint, region)
+ })
+
+ return osInstance, osClientErr
+}
+
+var MustObjectStorageDefaultErrHandler = func(err error) {
+ die.Die(fmt.Errorf("failed getting object storage client: %w", err).Error())
+}
+
+// MustObjectStorage returns the ObjectStorageClient or fatally exits.
+// Custom error handlers can be provided; the default handler calls die.Die.
+func MustObjectStorage(ehs ...func(error)) *ObjectStorageClient {
+ cl, err := GetObjectStorage()
+ if err != nil {
+ if len(ehs) > 0 {
+ for _, eh := range ehs {
+ eh(err)
+ }
+ } else {
+ MustObjectStorageDefaultErrHandler(err)
+ }
+ }
+ return cl
+}
diff --git a/internal/client/objectstorageclient_test.go b/internal/client/objectstorageclient_test.go
new file mode 100644
index 0000000000..827217aea6
--- /dev/null
+++ b/internal/client/objectstorageclient_test.go
@@ -0,0 +1,271 @@
+package client
+
+import (
+ "io"
+ "net/http"
+ "strings"
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+)
+
+// mockRoundTripper is a simple mock that returns a preconfigured response.
+type mockRoundTripper struct {
+ resp *http.Response
+ err error
+}
+
+func (m *mockRoundTripper) RoundTrip(_ *http.Request) (*http.Response, error) {
+ return m.resp, m.err
+}
+
+// newXMLResponse builds an *http.Response with the given XML body and content type.
+func newXMLResponse(body string) *http.Response {
+ return &http.Response{
+ StatusCode: 200,
+ Header: http.Header{"Content-Type": []string{"application/xml"}},
+ Body: io.NopCloser(strings.NewReader(body)),
+ ContentLength: int64(len(body)),
+ }
+}
+
+func TestOwnerIDFixTransport_RewritesAnonymousOwner(t *testing.T) {
+ input := `anonymous`
+ expected := `0`
+
+ transport := &ownerIDFixTransport{
+ base: &mockRoundTripper{resp: newXMLResponse(input)},
+ }
+
+ resp, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ body, err := io.ReadAll(resp.Body)
+ if !assert.NoError(t, err) {
+ return
+ }
+ assert.Equal(t, expected, string(body))
+}
+
+func TestOwnerIDFixTransport_PreservesNumericOwner(t *testing.T) {
+ input := `12345`
+
+ transport := &ownerIDFixTransport{
+ base: &mockRoundTripper{resp: newXMLResponse(input)},
+ }
+
+ resp, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ body, err := io.ReadAll(resp.Body)
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ // Pure numeric IDs contain no \D match, so the regex should NOT match.
+ assert.Equal(t, input, string(body), "numeric Owner ID should not be rewritten")
+}
+
+func TestOwnerIDFixTransport_SkipsNonXMLResponse(t *testing.T) {
+ jsonBody := `{"owner":{"id":"anonymous"}}`
+ resp := &http.Response{
+ StatusCode: 200,
+ Header: http.Header{"Content-Type": []string{"application/json"}},
+ Body: io.NopCloser(strings.NewReader(jsonBody)),
+ ContentLength: int64(len(jsonBody)),
+ }
+
+ transport := &ownerIDFixTransport{
+ base: &mockRoundTripper{resp: resp},
+ }
+
+ got, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ body, err := io.ReadAll(got.Body)
+ if !assert.NoError(t, err) {
+ return
+ }
+ assert.Equal(t, jsonBody, string(body), "non-XML response body should be unchanged")
+}
+
+func TestOwnerIDFixTransport_HandlesNilBody(t *testing.T) {
+ resp := &http.Response{
+ StatusCode: 204,
+ Header: http.Header{"Content-Type": []string{"application/xml"}},
+ Body: nil,
+ }
+
+ transport := &ownerIDFixTransport{
+ base: &mockRoundTripper{resp: resp},
+ }
+
+ got, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+ assert.Nil(t, got.Body, "nil body should remain nil")
+}
+
+func TestOwnerIDFixTransport_MultipleOwners(t *testing.T) {
+ input := `` +
+ `anonymous` +
+ `user-abc` +
+ ``
+ expected := `` +
+ `0` +
+ `0` +
+ ``
+
+ transport := &ownerIDFixTransport{
+ base: &mockRoundTripper{resp: newXMLResponse(input)},
+ }
+
+ resp, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ body, err := io.ReadAll(resp.Body)
+ if !assert.NoError(t, err) {
+ return
+ }
+ assert.Equal(t, expected, string(body))
+}
+
+func TestOwnerIDFixTransport_UpdatesContentLength(t *testing.T) {
+ // "anonymous" (9 chars) gets replaced with "0" (1 char), so the body shrinks.
+ input := `anonymous`
+ expected := `0`
+
+ transport := &ownerIDFixTransport{
+ base: &mockRoundTripper{resp: newXMLResponse(input)},
+ }
+
+ resp, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ body, err := io.ReadAll(resp.Body)
+ if !assert.NoError(t, err) {
+ return
+ }
+ assert.Equal(t, int64(len(expected)), resp.ContentLength,
+ "ContentLength should match actual rewritten body length")
+ assert.Equal(t, expected, string(body))
+}
+
+func TestOwnerIDFixTransport_UsesDefaultTransportWhenBaseNil(t *testing.T) {
+ // With a nil base, RoundTrip should use http.DefaultTransport under the hood.
+ // We verify this by temporarily replacing http.DefaultTransport with our mock,
+ // then restoring it after the test.
+ originalInput := `anonymous`
+ expectedOutput := `0`
+
+ mockTransport := &mockRoundTripper{resp: newXMLResponse(originalInput)}
+
+ originalDefault := http.DefaultTransport
+ http.DefaultTransport = mockTransport
+ defer func() { http.DefaultTransport = originalDefault }()
+
+ transport := &ownerIDFixTransport{base: nil}
+
+ resp, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ body, err := io.ReadAll(resp.Body)
+ if !assert.NoError(t, err) {
+ return
+ }
+ assert.Equal(t, expectedOutput, string(body),
+ "nil base should fall back to http.DefaultTransport and still rewrite")
+}
+
+func TestOwnerIDFixTransport_PreservesNonOwnerXML(t *testing.T) {
+ // The regex should only match ... patterns, not other elements.
+ input := `` +
+ `my-bucket` +
+ `some-request-id` +
+ `file.txtanonymous` +
+ ``
+ expected := `` +
+ `my-bucket` +
+ `some-request-id` +
+ `file.txt0` +
+ ``
+
+ transport := &ownerIDFixTransport{
+ base: &mockRoundTripper{resp: newXMLResponse(input)},
+ }
+
+ resp, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ body, err := io.ReadAll(resp.Body)
+ if !assert.NoError(t, err) {
+ return
+ }
+ assert.Equal(t, expected, string(body),
+ "only ... should be rewritten; other elements must be preserved")
+}
+
+func TestOwnerIDFixTransport_OwnerWithWhitespace(t *testing.T) {
+ // The regex allows \s* between and , test that whitespace is handled.
+ input := "\n anonymous\n"
+ expected := "\n 0\n"
+
+ transport := &ownerIDFixTransport{
+ base: &mockRoundTripper{resp: newXMLResponse(input)},
+ }
+
+ resp, err := transport.RoundTrip(&http.Request{})
+ if !assert.NoError(t, err) {
+ return
+ }
+
+ body, err := io.ReadAll(resp.Body)
+ if !assert.NoError(t, err) {
+ return
+ }
+ assert.Equal(t, expected, string(body))
+}
+
+func TestOwnerIDRe_MatchesNonNumeric(t *testing.T) {
+ // Direct regex tests to verify matching behavior precisely.
+ tests := []struct {
+ name string
+ input string
+ matches bool
+ output string
+ }{
+ {"pure alpha", "anonymous", true, "0"},
+ {"alphanumeric", "user123", true, "0"},
+ {"uuid-like", "550e8400-e29b-41d4-a716-446655440000", true, "0"},
+ {"pure numeric", "12345", false, "12345"},
+ {"empty id", "", false, ""},
+ {"with whitespace", "\nanon", true, "\n0"},
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ result := ownerIDRe.ReplaceAll([]byte(tt.input), []byte("${1}0${3}"))
+ if tt.matches {
+ assert.NotEqual(t, tt.input, string(result), "expected regex to match")
+ } else {
+ assert.Equal(t, tt.input, string(result), "expected regex NOT to match")
+ }
+ assert.Equal(t, tt.output, string(result))
+ })
+ }
+}
diff --git a/internal/client/types.go b/internal/client/types.go
index 241ba697f1..112ef0c324 100644
--- a/internal/client/types.go
+++ b/internal/client/types.go
@@ -3,7 +3,6 @@ package client
import (
"fmt"
- "github.com/ionos-cloud/ionosctl/v6/internal/constants"
"github.com/ionos-cloud/sdk-go-bundle/products/auth/v2"
"github.com/ionos-cloud/sdk-go-bundle/products/cdn/v2"
"github.com/ionos-cloud/sdk-go-bundle/products/cert/v2"
@@ -17,11 +16,14 @@ import (
"github.com/ionos-cloud/sdk-go-bundle/products/kafka/v2"
"github.com/ionos-cloud/sdk-go-bundle/products/logging/v2"
"github.com/ionos-cloud/sdk-go-bundle/products/monitoring/v2"
+ "github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2"
"github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2"
"github.com/ionos-cloud/sdk-go-bundle/shared/fileconfiguration"
vmasc "github.com/ionos-cloud/sdk-go-vm-autoscaling"
cloudv6 "github.com/ionos-cloud/sdk-go/v6"
"github.com/spf13/viper"
+
+ "github.com/ionos-cloud/ionosctl/v6/internal/constants"
)
// AuthSource represents a human-readable description of where the client's authentication credentials were sourced from.
@@ -35,6 +37,19 @@ const (
AuthSourceNone AuthSource = "no authentication provided"
)
+type ObjectStorageAccessKeySource string
+type ObjectStorageSecretKeySource string
+
+const (
+ ObjectStorageAccessKeyEnv ObjectStorageAccessKeySource = "environment variable: IONOS_S3_ACCESS_KEY"
+ ObjectStorageAccessKeyCfg ObjectStorageAccessKeySource = "Object Storage access key from config file: s3AccessKey"
+ ObjectStorageAccessKeyNone ObjectStorageAccessKeySource = "Object Storage access key not provided"
+
+ ObjectStorageSecretKeyEnv ObjectStorageSecretKeySource = "environment variable: IONOS_S3_SECRET_KEY"
+ ObjectStorageSecretKeyCfg ObjectStorageSecretKeySource = "Object Storage secret key from config file: s3SecretKey"
+ ObjectStorageSecretKeyNone ObjectStorageSecretKeySource = "Object Storage secret key not provided"
+)
+
// all possible sources in priority order
var AuthOrder = []AuthSource{
AuthSourceEnvBearer,
@@ -43,10 +58,21 @@ var AuthOrder = []AuthSource{
AuthSourceCfgBasic,
}
+var ObjectStorageAccessKeyOrder = []ObjectStorageAccessKeySource{
+ ObjectStorageAccessKeyEnv,
+ ObjectStorageAccessKeyCfg,
+}
+
+var ObjectStorageSecretKeyOrder = []ObjectStorageSecretKeySource{
+ ObjectStorageSecretKeyEnv,
+ ObjectStorageSecretKeyCfg,
+}
+
type Client struct {
- Config *fileconfiguration.FileConfig
- ConfigPath string // Path to the config file used to create this client, if any.
- AuthSource AuthSource
+ Config *fileconfiguration.FileConfig
+ ConfigPath string // Path to the config file used to create this client, if any.
+ AuthSource AuthSource
+
URLOverride string // If the client was created with a specific URL override, this will hold that value. If we notice a change in the URL, we need to re-create the client.
CloudClient *cloudv6.APIClient
@@ -71,3 +97,13 @@ type Client struct {
func appendUserAgent(userAgent string) string {
return fmt.Sprintf("%v_%v", viper.GetString(constants.CLIHttpUserAgent), userAgent)
}
+
+type ObjectStorageClient struct {
+ AccessKeySource ObjectStorageAccessKeySource
+ SecretKeySource ObjectStorageSecretKeySource
+
+ URLOverride string
+ Region string
+
+ ObjectStorageClient *objectstorage.APIClient
+}
diff --git a/internal/constants/constants.go b/internal/constants/constants.go
index f94239b0d8..026da84f56 100644
--- a/internal/constants/constants.go
+++ b/internal/constants/constants.go
@@ -17,6 +17,11 @@ const (
FlagFiltersShort = "F"
)
+// object storage flags
+const (
+ FlagS3Region = "region"
+)
+
// flags
const (
FlagProviderID = "provider-id"
@@ -293,30 +298,32 @@ const (
)
const (
- DefaultApiURL = "https://api.ionos.com"
- DNSApiRegionalURL = "https://dns.%s.ionos.com"
- LoggingApiRegionalURL = "https://logging.%s.ionos.com"
- CDNApiRegionalURL = "https://cdn.%s.ionos.com"
- CertApiRegionalURL = "https://certificate-manager.%s.ionos.com"
- MariaDBApiRegionalURL = "https://mariadb.%s.ionos.com"
- InMemoryDBApiRegionalURL = "https://in-memory-db.%s.ionos.com"
- VPNApiRegionalURL = "https://vpn.%s.ionos.com"
- KafkaApiRegionalURL = "https://kafka.%s.ionos.com"
- MonitoringApiRegionalURL = "https://monitoring.%s.ionos.com"
- PostgresApiRegionalURL = "https://postgresql.%s.ionos.com"
+ DefaultApiURL = "https://api.ionos.com"
+ DNSApiRegionalURL = "https://dns.%s.ionos.com"
+ LoggingApiRegionalURL = "https://logging.%s.ionos.com"
+ CDNApiRegionalURL = "https://cdn.%s.ionos.com"
+ CertApiRegionalURL = "https://certificate-manager.%s.ionos.com"
+ MariaDBApiRegionalURL = "https://mariadb.%s.ionos.com"
+ InMemoryDBApiRegionalURL = "https://in-memory-db.%s.ionos.com"
+ VPNApiRegionalURL = "https://vpn.%s.ionos.com"
+ KafkaApiRegionalURL = "https://kafka.%s.ionos.com"
+ MonitoringApiRegionalURL = "https://monitoring.%s.ionos.com"
+ PostgresApiRegionalURL = "https://postgresql.%s.ionos.com"
+ ObjectStorageApiRegionalURL = "https://s3.%s.ionoscloud.com"
)
var (
- MonitoringLocations = []string{"de/fra", "de/txl", "es/vit", "gb/bhx", "gb/lhr", "fr/par", "us/mci"}
- DNSLocations = []string{"de/fra"}
- LoggingLocations = []string{"de/txl", "de/fra", "gb/lhr", "fr/par", "es/vit", "us/mci", "gb/bhx"}
- CDNLocations = []string{"de/fra"}
- CertLocations = []string{"de/fra"}
- MariaDBLocations = []string{"de/txl", "de/fra", "es/vit", "fr/par", "gb/lhr", "us/ewr", "us/las", "us/mci"}
- InMemoryDBLocations = []string{"de/fra", "de/txl", "es/vit", "gb/txl", "gb/lhr", "gb/bhx", "us/ewr", "us/las", "us/mci", "fr/par"}
- VPNLocations = []string{"de/fra", "de/txl", "es/vit", "fr/par", "gb/lhr", "gb/bhx", "us/ewr", "us/las", "us/mci"}
- KafkaLocations = []string{"de/fra", "de/txl", "es/vit", "gb/lhr", "gb/bhx", "us/ewr", "us/las", "us/mci", "fr/par"}
- PostgresLocations = []string{"de/txl", "de/fra", "es/vit", "fr/par", "gb/lhr", "gb/bhx", "us/las", "us/mci", "us/ewr"}
+ MonitoringLocations = []string{"de/fra", "de/txl", "es/vit", "gb/bhx", "gb/lhr", "fr/par", "us/mci"}
+ DNSLocations = []string{"de/fra"}
+ LoggingLocations = []string{"de/txl", "de/fra", "gb/lhr", "fr/par", "es/vit", "us/mci", "gb/bhx"}
+ CDNLocations = []string{"de/fra"}
+ CertLocations = []string{"de/fra"}
+ MariaDBLocations = []string{"de/txl", "de/fra", "es/vit", "fr/par", "gb/lhr", "us/ewr", "us/las", "us/mci"}
+ InMemoryDBLocations = []string{"de/fra", "de/txl", "es/vit", "gb/txl", "gb/lhr", "gb/bhx", "us/ewr", "us/las", "us/mci", "fr/par"}
+ VPNLocations = []string{"de/fra", "de/txl", "es/vit", "fr/par", "gb/lhr", "gb/bhx", "us/ewr", "us/las", "us/mci"}
+ KafkaLocations = []string{"de/fra", "de/txl", "es/vit", "gb/lhr", "gb/bhx", "us/ewr", "us/las", "us/mci", "fr/par"}
+ PostgresLocations = []string{"de/txl", "de/fra", "es/vit", "fr/par", "gb/lhr", "gb/bhx", "us/las", "us/mci", "us/ewr"}
+ ObjectStorageLocations = []string{"eu-central-3", "eu-central-4", "us-central-1"}
)
// enum values
diff --git a/internal/core/doc/doc.go b/internal/core/doc/doc.go
index 528516871a..1c1b0af246 100644
--- a/internal/core/doc/doc.go
+++ b/internal/core/doc/doc.go
@@ -78,6 +78,8 @@ var subdirRules = []SubdirRule{
{Prefix: []string{"vm", "autoscaling"}, Template: "VM Autoscaling/{2+}"},
{Prefix: []string{"vpn"}, Template: "VPN Gateway/{1+}"},
{Prefix: []string{"logging", "service"}, Template: "Logging-Service/{2+}"},
+ // object-storage → ["object","storage"]
+ {Prefix: []string{"object", "storage"}, Template: "Object-Storage/{2+}"},
// fallback → Compute Engine (strips "compute" prefix)
{Prefix: []string{"compute"}, Template: "Compute Engine/{1+}"},
diff --git a/test/suites/object-storage/cors.bats b/test/suites/object-storage/cors.bats
new file mode 100644
index 0000000000..3ca49b6110
--- /dev/null
+++ b/test/suites/object-storage/cors.bats
@@ -0,0 +1,167 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-cors-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ echo "created test bucket for CORS tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ # Clean up any leftover CORS config before deleting the bucket
+ run ionosctl object-storage bucket cors delete --name "$TEST_BUCKET_NAME" -f
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- validation ---
+
+@test "object-storage bucket cors get: missing --name flag returns error" {
+ run ionosctl object-storage bucket cors get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket cors put: missing --name flag returns error" {
+ run ionosctl object-storage bucket cors put
+ assert_failure
+}
+
+@test "object-storage bucket cors put: missing --json-properties returns error" {
+ run ionosctl object-storage bucket cors put --name some-bucket
+ assert_failure
+ assert_stderr -p "requires at least 2 options"
+}
+
+@test "object-storage bucket cors delete: missing --name flag returns error" {
+ run ionosctl object-storage bucket cors delete
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket cors get: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket cors get --name some-bucket
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage bucket cors put: --json-properties-example prints example JSON" {
+ run ionosctl object-storage bucket cors put --json-properties-example
+ assert_success
+ assert_output -p "CORSRules"
+ assert_output -p "AllowedOrigins"
+ assert_output -p "AllowedMethods"
+}
+
+@test "object-storage bucket cors put: nonexistent file returns error" {
+ run ionosctl object-storage bucket cors put --name "$TEST_BUCKET_NAME" --json-properties "/tmp/nonexistent-cors-file.json"
+ assert_failure
+}
+
+# --- CORS: put, get, delete lifecycle ---
+
+@test "object-storage bucket cors put: apply CORS configuration" {
+ local tmpfile="$(mktemp)"
+ cat > "$tmpfile" < "$tmpfile" < "$tmpfile" <&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-enc-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ echo "created test bucket for encryption tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ # Clean up any leftover encryption config before deleting the bucket
+ run ionosctl object-storage bucket encryption delete --name "$TEST_BUCKET_NAME" -f
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- validation ---
+
+@test "object-storage bucket encryption get: missing --name flag returns error" {
+ run ionosctl object-storage bucket encryption get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket encryption put: missing --name flag returns error" {
+ run ionosctl object-storage bucket encryption put
+ assert_failure
+}
+
+@test "object-storage bucket encryption put: missing --json-properties returns error" {
+ run ionosctl object-storage bucket encryption put --name some-bucket
+ assert_failure
+ assert_stderr -p "requires at least 2 options"
+}
+
+@test "object-storage bucket encryption delete: missing --name flag returns error" {
+ run ionosctl object-storage bucket encryption delete
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket encryption get: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket encryption get --name some-bucket
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage bucket encryption put: --json-properties-example prints example JSON" {
+ run ionosctl object-storage bucket encryption put --json-properties-example
+ assert_success
+ assert_output -p "Rules"
+ assert_output -p "SSEAlgorithm"
+ assert_output -p "AES256"
+}
+
+@test "object-storage bucket encryption put: nonexistent file returns error" {
+ run ionosctl object-storage bucket encryption put --name "$TEST_BUCKET_NAME" --json-properties "/tmp/nonexistent-encryption-file.json"
+ assert_failure
+}
+
+# --- encryption: put, get, delete lifecycle ---
+
+@test "object-storage bucket encryption put: apply AES256 encryption" {
+ local tmpfile="$(mktemp)"
+ cat > "$tmpfile" < "$tmpfile" <&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-lh-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+ export TEST_KEY="test-legal-hold.txt"
+ export TEST_FILE="/tmp/ionosctl-test-lh-$$.txt"
+
+ echo "legal hold test content" > "$TEST_FILE"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION" --object-lock
+ assert_success
+
+ run ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --source "$TEST_FILE"
+ assert_success
+
+ echo "created test bucket with object-lock for legal-hold tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ rm -f "$TEST_FILE"
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ # SAFETY: Always remove legal hold before deleting
+ run ionosctl object-storage object legal-hold put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --status OFF
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- legal-hold get: validation ---
+
+@test "object-storage object legal-hold get: missing --name flag returns error" {
+ run ionosctl object-storage object legal-hold get --key foo
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object legal-hold get: missing --key flag returns error" {
+ run ionosctl object-storage object legal-hold get --name "$TEST_BUCKET_NAME"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+# --- legal-hold put: validation ---
+
+@test "object-storage object legal-hold put: missing --name flag returns error" {
+ run ionosctl object-storage object legal-hold put --key foo --status ON
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object legal-hold put: missing --key flag returns error" {
+ run ionosctl object-storage object legal-hold put --name "$TEST_BUCKET_NAME" --status ON
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object legal-hold put: missing --status flag returns error" {
+ run ionosctl object-storage object legal-hold put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+# --- legal-hold put/get: lifecycle ---
+
+# SAFETY: Legal hold ON is applied and then immediately set to OFF in subsequent tests.
+# Teardown also ensures legal hold is always removed before cleanup.
+@test "object-storage object legal-hold put: set status ON" {
+ run ionosctl object-storage object legal-hold put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --status ON
+ assert_success
+ assert_output -p "applied successfully"
+}
+
+@test "object-storage object legal-hold get: verify status is ON" {
+ run ionosctl object-storage object legal-hold get --name "$TEST_BUCKET_NAME" --key "$TEST_KEY"
+ assert_success
+ assert_output -p "ON"
+}
+
+@test "object-storage object legal-hold put: set status OFF" {
+ run ionosctl object-storage object legal-hold put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --status OFF
+ assert_success
+ assert_output -p "applied successfully"
+}
+
+@test "object-storage object legal-hold get: verify status is OFF" {
+ run ionosctl object-storage object legal-hold get --name "$TEST_BUCKET_NAME" --key "$TEST_KEY"
+ assert_success
+ assert_output -p "OFF"
+}
diff --git a/test/suites/object-storage/lifecycle.bats b/test/suites/object-storage/lifecycle.bats
new file mode 100644
index 0000000000..909911f0fe
--- /dev/null
+++ b/test/suites/object-storage/lifecycle.bats
@@ -0,0 +1,112 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-lc-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ echo "created test bucket for lifecycle tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ run ionosctl object-storage bucket lifecycle delete --name "$TEST_BUCKET_NAME" -f
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- validation ---
+
+@test "object-storage bucket lifecycle get: missing --name flag returns error" {
+ run ionosctl object-storage bucket lifecycle get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket lifecycle put: missing --name flag returns error" {
+ run ionosctl object-storage bucket lifecycle put
+ assert_failure
+}
+
+@test "object-storage bucket lifecycle put: missing --json-properties returns error" {
+ run ionosctl object-storage bucket lifecycle put --name some-bucket
+ assert_failure
+}
+
+@test "object-storage bucket lifecycle delete: missing --name flag returns error" {
+ run ionosctl object-storage bucket lifecycle delete
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket lifecycle get: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket lifecycle get --name some-bucket
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage bucket lifecycle put: --json-properties-example prints example JSON" {
+ run ionosctl object-storage bucket lifecycle put --json-properties-example
+ assert_success
+ assert_output -p "Rules"
+ assert_output -p "Expiration"
+ assert_output -p "Days"
+}
+
+@test "object-storage bucket lifecycle put: nonexistent file returns error" {
+ run ionosctl object-storage bucket lifecycle put --name "$TEST_BUCKET_NAME" --json-properties "/tmp/nonexistent-lifecycle.json"
+ assert_failure
+}
+
+# --- lifecycle: put, get, delete ---
+# SAFETY: Rules use Days: 90 — they will NOT trigger during the test run.
+# No versioning, no object-lock, no retention.
+
+@test "object-storage bucket lifecycle put: apply lifecycle rules" {
+ local tmpfile="$(mktemp)"
+ cat > "$tmpfile" </dev/null
+}
+
+@test "object-storage bucket lifecycle delete: remove lifecycle configuration" {
+ run ionosctl object-storage bucket lifecycle delete --name "$TEST_BUCKET_NAME" -f
+ assert_success
+ assert_output -p "deleted successfully"
+}
+
+@test "object-storage bucket lifecycle get: after delete returns error" {
+ run ionosctl object-storage bucket lifecycle get --name "$TEST_BUCKET_NAME"
+ assert_failure
+}
diff --git a/test/suites/object-storage/object-lock.bats b/test/suites/object-storage/object-lock.bats
new file mode 100644
index 0000000000..3bb90721aa
--- /dev/null
+++ b/test/suites/object-storage/object-lock.bats
@@ -0,0 +1,82 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-ol-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION" --object-lock
+ assert_success
+
+ echo "created test bucket with object-lock for object-lock tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all --bypass-governance-retention -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- object-lock get ---
+
+@test "object-storage bucket object-lock get: missing --name flag returns error" {
+ run ionosctl object-storage bucket object-lock get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket object-lock get: returns config for object-lock enabled bucket" {
+ run ionosctl object-storage bucket object-lock get --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "Enabled"
+}
+
+@test "object-storage bucket object-lock get: json output contains expected fields" {
+ run ionosctl object-storage bucket object-lock get --name "$TEST_BUCKET_NAME" -o json
+ assert_success
+ echo "$output" | jq -e '.ObjectLockEnabled' >/dev/null
+}
+
+# --- object-lock put ---
+
+@test "object-storage bucket object-lock put: missing --name flag returns error" {
+ run ionosctl object-storage bucket object-lock put --mode GOVERNANCE --days 1
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage bucket object-lock put: missing --mode flag returns error" {
+ run ionosctl object-storage bucket object-lock put --name "$TEST_BUCKET_NAME" --days 1
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage bucket object-lock put: missing --days and --years returns error" {
+ run ionosctl object-storage bucket object-lock put --name "$TEST_BUCKET_NAME" --mode GOVERNANCE
+ assert_failure
+ assert_stderr -p "at least one of"
+}
+
+# SAFETY: Uses GOVERNANCE mode only (never COMPLIANCE). Default retention only
+# affects NEW objects placed after the config, not existing ones or the bucket itself.
+@test "object-storage bucket object-lock put: apply GOVERNANCE config with 1 day retention" {
+ run ionosctl object-storage bucket object-lock put --name "$TEST_BUCKET_NAME" --mode GOVERNANCE --days 1
+ assert_success
+ assert_output -p "applied successfully"
+}
+
+@test "object-storage bucket object-lock put: verify config after put" {
+ run ionosctl object-storage bucket object-lock get --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "GOVERNANCE"
+}
diff --git a/test/suites/object-storage/object-storage.bats b/test/suites/object-storage/object-storage.bats
new file mode 100644
index 0000000000..f91999b574
--- /dev/null
+++ b/test/suites/object-storage/object-storage.bats
@@ -0,0 +1,231 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ echo "created test bucket: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- list ---
+
+@test "object-storage bucket list: returns test bucket" {
+ run ionosctl object-storage bucket list
+ assert_success
+ assert_output -p "$TEST_BUCKET_NAME"
+}
+
+@test "object-storage bucket list: --location filters by region" {
+ run ionosctl object-storage bucket list --location "$TEST_REGION"
+ assert_success
+ assert_output -p "$TEST_BUCKET_NAME"
+}
+
+@test "object-storage bucket list: json output" {
+ run ionosctl object-storage bucket list -o json
+ assert_success
+ echo "$output" | jq -e '.items[0].Name // .[0].Name // .Name' >/dev/null
+}
+
+@test "object-storage bucket list: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket list
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+# --- get ---
+
+@test "object-storage bucket get: missing --name flag returns error" {
+ run ionosctl object-storage bucket get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket create: missing --name flag returns error" {
+ run ionosctl object-storage bucket create
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket get: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket get --name some-bucket
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage bucket get: retrieve existing bucket" {
+ run ionosctl object-storage bucket get --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "$TEST_BUCKET_NAME"
+}
+
+@test "object-storage bucket get: bucket not found returns error" {
+ run ionosctl object-storage bucket get --name "nonexistent-bucket-$(randStr 10 | tr '[:upper:]' '[:lower:]')"
+ assert_failure
+ assert_stderr -p "not found"
+}
+
+@test "object-storage bucket get: json output contains expected fields" {
+ run ionosctl object-storage bucket get --name "$TEST_BUCKET_NAME" -o json
+ assert_success
+
+ echo "$output" | jq -e '.Name' >/dev/null
+ echo "$output" | jq -e '.CreationDate' >/dev/null
+}
+
+@test "object-storage bucket head: missing --name flag returns error" {
+ run ionosctl object-storage bucket head
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket head: existing bucket is accessible" {
+ run ionosctl object-storage bucket head --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "exists and is accessible"
+}
+
+@test "object-storage bucket head: nonexistent bucket returns error" {
+ run ionosctl object-storage bucket head --name "nonexistent-bucket-$(randStr 10 | tr '[:upper:]' '[:lower:]')"
+ assert_failure
+}
+
+@test "object-storage bucket head: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket head --name some-bucket
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage bucket versioning get: missing --name flag returns error" {
+ run ionosctl object-storage bucket versioning get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket versioning get: returns versioning state" {
+ run ionosctl object-storage bucket versioning get --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "$TEST_BUCKET_NAME"
+}
+
+@test "object-storage bucket versioning get: new bucket has versioning disabled" {
+ run ionosctl object-storage bucket versioning get --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "Disabled"
+}
+
+@test "object-storage bucket versioning get: json output" {
+ run ionosctl object-storage bucket versioning get --name "$TEST_BUCKET_NAME" -o json
+ assert_success
+ echo "$output" | jq -e '.Versioning' >/dev/null
+}
+
+@test "object-storage bucket versioning set: missing flags returns error" {
+ run ionosctl object-storage bucket versioning set
+ assert_failure
+ assert_stderr -p "requires at least 2 option"
+}
+
+@test "object-storage bucket versioning set: missing --status flag returns error" {
+ run ionosctl object-storage bucket versioning set --name "$TEST_BUCKET_NAME"
+ assert_failure
+}
+
+@test "object-storage bucket versioning set: enable versioning" {
+ run ionosctl object-storage bucket versioning set --name "$TEST_BUCKET_NAME" --status Enabled
+ assert_success
+ assert_output -p "Enabled"
+
+ # Verify with get
+ run ionosctl object-storage bucket versioning get --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "Enabled"
+}
+
+@test "object-storage bucket versioning set: suspend versioning" {
+ run ionosctl object-storage bucket versioning set --name "$TEST_BUCKET_NAME" --status Suspended
+ assert_success
+ assert_output -p "Suspended"
+
+ # Verify with get
+ run ionosctl object-storage bucket versioning get --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "Suspended"
+}
+
+@test "object-storage bucket head: json output" {
+ run ionosctl object-storage bucket head --name "$TEST_BUCKET_NAME" -o json
+ assert_success
+ echo "$output" | jq -e '.Status' >/dev/null
+}
+
+@test "object-storage object list: missing --name flag returns error" {
+ run ionosctl object-storage object list
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage object list: empty bucket returns no objects" {
+ run ionosctl object-storage object list --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "No objects found"
+}
+
+@test "object-storage object list: nonexistent prefix returns no objects" {
+ run ionosctl object-storage object list --name "$TEST_BUCKET_NAME" --prefix "nonexistent-prefix/"
+ assert_success
+ assert_output -p "No objects found"
+}
+
+# --- delete ---
+
+@test "object-storage bucket delete: missing --name flag returns error" {
+ run ionosctl object-storage bucket delete
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket delete: --force skips prompt on nonexistent bucket" {
+ run ionosctl object-storage bucket delete --name "nonexistent-bucket-$(randStr 10 | tr '[:upper:]' '[:lower:]')" -f
+ assert_failure
+}
+
+@test "object-storage bucket delete: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket delete --name some-bucket -f
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+# --- output ---
+
+@test "object-storage bucket get: --cols flag filters output columns" {
+ run ionosctl object-storage bucket get --name "$TEST_BUCKET_NAME" --cols Name
+ assert_success
+ assert_output -p "$TEST_BUCKET_NAME"
+ # CreationDate column should not appear in header
+ refute_output -p "CREATIONDATE"
+}
diff --git a/test/suites/object-storage/object-tagging.bats b/test/suites/object-storage/object-tagging.bats
new file mode 100644
index 0000000000..196a19459b
--- /dev/null
+++ b/test/suites/object-storage/object-tagging.bats
@@ -0,0 +1,134 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-otag-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+ export TEST_KEY="test-tagging.txt"
+ export TEST_FILE="/tmp/ionosctl-test-otag-$$.txt"
+
+ echo "object tagging test content" > "$TEST_FILE"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ run ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --source "$TEST_FILE"
+ assert_success
+
+ echo "created test bucket with object for object-tagging tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ rm -f "$TEST_FILE"
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- validation ---
+
+@test "object-storage object tagging get: missing --name flag returns error" {
+ run ionosctl object-storage object tagging get --key foo
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object tagging get: missing --key flag returns error" {
+ run ionosctl object-storage object tagging get --name "$TEST_BUCKET_NAME"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object tagging put: missing --name flag returns error" {
+ run ionosctl object-storage object tagging put --key foo --json-properties /dev/null
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object tagging put: missing --key flag returns error" {
+ run ionosctl object-storage object tagging put --name "$TEST_BUCKET_NAME" --json-properties /dev/null
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object tagging delete: missing --name flag returns error" {
+ run ionosctl object-storage object tagging delete --key foo
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object tagging delete: missing --key flag returns error" {
+ run ionosctl object-storage object tagging delete --name "$TEST_BUCKET_NAME"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object tagging get: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage object tagging get --name some-bucket --key foo
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage object tagging put: --json-properties-example prints example JSON" {
+ run ionosctl object-storage object tagging put --json-properties-example
+ assert_success
+ assert_output -p "TagSet"
+ assert_output -p "Environment"
+}
+
+@test "object-storage object tagging put: nonexistent file returns error" {
+ run ionosctl object-storage object tagging put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --json-properties "/tmp/nonexistent-tags.json"
+ assert_failure
+}
+
+# --- lifecycle: put, get, delete ---
+
+@test "object-storage object tagging put: apply tags" {
+ local tmpfile="$(mktemp)"
+ cat > "$tmpfile" </dev/null
+ echo "$output" | jq -e '.items[0].Value // .[0].Value' >/dev/null
+}
+
+@test "object-storage object tagging delete: remove tags" {
+ run ionosctl object-storage object tagging delete --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" -f
+ assert_success
+ assert_output -p "deleted successfully"
+}
+
+@test "object-storage object tagging get: after delete returns empty or error" {
+ run ionosctl object-storage object tagging get --name "$TEST_BUCKET_NAME" --key "$TEST_KEY"
+ # After deleting tags, get may return empty set or error depending on API behavior
+ # We just verify the command completes (no hanging)
+}
diff --git a/test/suites/object-storage/object.bats b/test/suites/object-storage/object.bats
new file mode 100644
index 0000000000..e020c286db
--- /dev/null
+++ b/test/suites/object-storage/object.bats
@@ -0,0 +1,210 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-obj-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+ export TEST_KEY="test-object.txt"
+ export TEST_FILE="/tmp/ionosctl-test-upload-$$.txt"
+ export TEST_DOWNLOAD="/tmp/ionosctl-test-download-$$.txt"
+
+ echo "hello ionosctl object test" > "$TEST_FILE"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ echo "created test bucket for object tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ rm -f "$TEST_FILE" "$TEST_DOWNLOAD"
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- put: validation ---
+
+@test "object-storage object put: missing --name flag returns error" {
+ run ionosctl object-storage object put --key foo --source "$TEST_FILE"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object put: missing --key flag returns error" {
+ run ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --source "$TEST_FILE"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object put: missing --source flag returns error" {
+ run ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --key foo
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object put: nonexistent source file returns error" {
+ run ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --key foo --source /nonexistent
+ assert_failure
+ assert_stderr -p "opening source file"
+}
+
+@test "object-storage object put: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --key foo --source "$TEST_FILE"
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+# --- put: success ---
+
+@test "object-storage object put: upload file succeeds" {
+ run ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --source "$TEST_FILE"
+ assert_success
+ assert_output -p "uploaded to bucket"
+}
+
+# --- head ---
+
+@test "object-storage object head: missing --name flag returns error" {
+ run ionosctl object-storage object head --key foo
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object head: missing --key flag returns error" {
+ run ionosctl object-storage object head --name "$TEST_BUCKET_NAME"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object head: returns metadata for uploaded object" {
+ run ionosctl object-storage object head --name "$TEST_BUCKET_NAME" --key "$TEST_KEY"
+ assert_success
+ assert_output -p "$TEST_KEY"
+}
+
+@test "object-storage object head: json output contains expected fields" {
+ run ionosctl object-storage object head --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" -o json
+ assert_success
+ echo "$output" | jq -e '.Key' >/dev/null
+ echo "$output" | jq -e '.ContentType' >/dev/null
+ echo "$output" | jq -e '.ETag' >/dev/null
+}
+
+@test "object-storage object head: nonexistent key returns error" {
+ run ionosctl object-storage object head --name "$TEST_BUCKET_NAME" --key "nonexistent-key-$(randStr 10)"
+ assert_failure
+}
+
+# --- get ---
+
+@test "object-storage object get: missing --name flag returns error" {
+ run ionosctl object-storage object get --key foo
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object get: missing --key flag returns error" {
+ run ionosctl object-storage object get --name "$TEST_BUCKET_NAME"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object get: download file succeeds" {
+ run ionosctl object-storage object get --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --destination "$TEST_DOWNLOAD"
+ assert_success
+ assert_output -p "downloaded to"
+ [ -f "$TEST_DOWNLOAD" ]
+ diff "$TEST_FILE" "$TEST_DOWNLOAD"
+}
+
+@test "object-storage object get: nonexistent key returns error" {
+ run ionosctl object-storage object get --name "$TEST_BUCKET_NAME" --key "nonexistent-key-$(randStr 10)" --destination /tmp/nope
+ assert_failure
+}
+
+# --- copy ---
+
+@test "object-storage object copy: missing --name flag returns error" {
+ run ionosctl object-storage object copy --key foo --copy-source "/src/key"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object copy: missing --key flag returns error" {
+ run ionosctl object-storage object copy --name "$TEST_BUCKET_NAME" --copy-source "/src/key"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object copy: missing --copy-source flag returns error" {
+ run ionosctl object-storage object copy --name "$TEST_BUCKET_NAME" --key "dest"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object copy: copy object within same bucket succeeds" {
+ run ionosctl object-storage object copy \
+ --name "$TEST_BUCKET_NAME" \
+ --key "copy-of-${TEST_KEY}" \
+ --copy-source "/${TEST_BUCKET_NAME}/${TEST_KEY}"
+ assert_success
+ assert_output -p "ETag"
+}
+
+# --- delete ---
+
+@test "object-storage object delete: missing --name flag returns error" {
+ run ionosctl object-storage object delete --key foo -f
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object delete: missing --key and --all flags returns error" {
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" -f
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object delete: --all without --name returns error" {
+ run ionosctl object-storage object delete --all -f
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object delete: delete object succeeds" {
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" -f
+ assert_success
+ assert_output -p "deleted from bucket"
+}
+
+@test "object-storage object delete: delete copied object succeeds" {
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --key "copy-of-${TEST_KEY}" -f
+ assert_success
+ assert_output -p "deleted from bucket"
+}
+
+@test "object-storage object delete: --all deletes all objects in bucket" {
+ run ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --key "all-test.txt" --source "$TEST_FILE"
+ assert_success
+
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ assert_success
+ assert_output -p "All objects deleted"
+
+ # Verify bucket is empty
+ run ionosctl object-storage object list --name "$TEST_BUCKET_NAME"
+ assert_success
+ assert_output -p "No objects found"
+}
diff --git a/test/suites/object-storage/policy.bats b/test/suites/object-storage/policy.bats
new file mode 100644
index 0000000000..469e89516b
--- /dev/null
+++ b/test/suites/object-storage/policy.bats
@@ -0,0 +1,347 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-pol-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ echo "created test bucket for policy tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ # Clean up any leftover policy before deleting the bucket
+ run ionosctl object-storage bucket policy delete --name "$TEST_BUCKET_NAME" -f
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- validation ---
+
+@test "object-storage bucket policy get: missing --name flag returns error" {
+ run ionosctl object-storage bucket policy get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket policy put: missing --name flag returns error" {
+ run ionosctl object-storage bucket policy put
+ assert_failure
+}
+
+@test "object-storage bucket policy put: missing --json-properties returns error" {
+ run ionosctl object-storage bucket policy put --name some-bucket
+ assert_failure
+ assert_stderr -p "requires at least 2 options"
+}
+
+@test "object-storage bucket policy delete: missing --name flag returns error" {
+ run ionosctl object-storage bucket policy delete
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket policy status: missing --name flag returns error" {
+ run ionosctl object-storage bucket policy status
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket policy get: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket policy get --name some-bucket
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage bucket policy put: --json-properties-example prints example JSON" {
+ run ionosctl object-storage bucket policy put --json-properties-example
+ assert_success
+ assert_output -p "Statement"
+ assert_output -p "Effect"
+ assert_output -p "Principal"
+}
+
+@test "object-storage bucket policy put: nonexistent file returns error" {
+ run ionosctl object-storage bucket policy put --name "$TEST_BUCKET_NAME" --json-properties "/tmp/nonexistent-policy-file.json"
+ assert_failure
+}
+
+# --- policy format: basic Allow with Principal object ---
+
+@test "object-storage bucket policy put: basic Allow with Principal object" {
+ local tmpfile="$(mktemp)"
+ cat > "$tmpfile" < "$tmpfile" < "$tmpfile" < "$tmpfile" < "$tmpfile" < "$tmpfile" < "$tmpfile" < "$tmpfile" < "$tmpfile" < "$tmpfile" <&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-pab-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ echo "created test bucket for public-access-block tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ run ionosctl object-storage bucket public-access-block delete --name "$TEST_BUCKET_NAME" -f
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- validation ---
+
+@test "object-storage bucket public-access-block get: missing --name flag returns error" {
+ run ionosctl object-storage bucket public-access-block get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket public-access-block put: missing --name flag returns error" {
+ run ionosctl object-storage bucket public-access-block put
+ assert_failure
+}
+
+@test "object-storage bucket public-access-block put: missing --json-properties returns error" {
+ run ionosctl object-storage bucket public-access-block put --name some-bucket
+ assert_failure
+}
+
+@test "object-storage bucket public-access-block delete: missing --name flag returns error" {
+ run ionosctl object-storage bucket public-access-block delete
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket public-access-block get: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket public-access-block get --name some-bucket
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage bucket public-access-block put: --json-properties-example prints example JSON" {
+ run ionosctl object-storage bucket public-access-block put --json-properties-example
+ assert_success
+ assert_output -p "BlockPublicAcls"
+ assert_output -p "RestrictPublicBuckets"
+}
+
+@test "object-storage bucket public-access-block put: nonexistent file returns error" {
+ run ionosctl object-storage bucket public-access-block put --name "$TEST_BUCKET_NAME" --json-properties "/tmp/nonexistent-pab.json"
+ assert_failure
+}
+
+# --- lifecycle: put, get, delete ---
+
+@test "object-storage bucket public-access-block put: apply configuration" {
+ local tmpfile="$(mktemp)"
+ cat > "$tmpfile" </dev/null
+ echo "$output" | jq -e '.RestrictPublicBuckets' >/dev/null
+}
+
+@test "object-storage bucket public-access-block delete: remove configuration" {
+ run ionosctl object-storage bucket public-access-block delete --name "$TEST_BUCKET_NAME" -f
+ assert_success
+ assert_output -p "deleted successfully"
+}
+
+@test "object-storage bucket public-access-block get: after delete returns error" {
+ run ionosctl object-storage bucket public-access-block get --name "$TEST_BUCKET_NAME"
+ assert_failure
+}
diff --git a/test/suites/object-storage/retention.bats b/test/suites/object-storage/retention.bats
new file mode 100644
index 0000000000..f65c6fde32
--- /dev/null
+++ b/test/suites/object-storage/retention.bats
@@ -0,0 +1,104 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-ret-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+ export TEST_KEY="test-retention.txt"
+ export TEST_FILE="/tmp/ionosctl-test-ret-$$.txt"
+
+ # Compute retain-until-date as tomorrow in RFC 3339 format
+ export RETAIN_UNTIL_DATE="$(date -u -d '+1 day' '+%Y-%m-%dT00:00:00Z')"
+
+ echo "retention test content" > "$TEST_FILE"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION" --object-lock
+ assert_success
+
+ run ionosctl object-storage object put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" --source "$TEST_FILE"
+ assert_success
+
+ echo "created test bucket with object-lock for retention tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ rm -f "$TEST_FILE"
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ # SAFETY: Use --bypass-governance-retention to delete objects with GOVERNANCE retention
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all --bypass-governance-retention -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- retention get: validation ---
+
+@test "object-storage object retention get: missing --name flag returns error" {
+ run ionosctl object-storage object retention get --key foo
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object retention get: missing --key flag returns error" {
+ run ionosctl object-storage object retention get --name "$TEST_BUCKET_NAME"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+# --- retention put: validation ---
+
+@test "object-storage object retention put: missing --name flag returns error" {
+ run ionosctl object-storage object retention put --key foo --mode GOVERNANCE --retain-until-date "$RETAIN_UNTIL_DATE"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object retention put: missing --key flag returns error" {
+ run ionosctl object-storage object retention put --name "$TEST_BUCKET_NAME" --mode GOVERNANCE --retain-until-date "$RETAIN_UNTIL_DATE"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object retention put: missing --mode flag returns error" {
+ run ionosctl object-storage object retention put --name "$TEST_BUCKET_NAME" --key foo --retain-until-date "$RETAIN_UNTIL_DATE"
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+@test "object-storage object retention put: missing --retain-until-date flag returns error" {
+ run ionosctl object-storage object retention put --name "$TEST_BUCKET_NAME" --key foo --mode GOVERNANCE
+ assert_failure
+ assert_stderr -p "requires at least"
+}
+
+# --- retention put/get: lifecycle ---
+
+# SAFETY: Uses GOVERNANCE mode ONLY (never COMPLIANCE).
+# Teardown uses --bypass-governance-retention to clean up.
+@test "object-storage object retention put: apply GOVERNANCE retention" {
+ run ionosctl object-storage object retention put --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" \
+ --mode GOVERNANCE --retain-until-date "$RETAIN_UNTIL_DATE"
+ assert_success
+ assert_output -p "applied successfully"
+}
+
+@test "object-storage object retention get: verify retention after put" {
+ run ionosctl object-storage object retention get --name "$TEST_BUCKET_NAME" --key "$TEST_KEY"
+ assert_success
+ assert_output -p "GOVERNANCE"
+}
+
+@test "object-storage object retention get: json output contains expected fields" {
+ run ionosctl object-storage object retention get --name "$TEST_BUCKET_NAME" --key "$TEST_KEY" -o json
+ assert_success
+ echo "$output" | jq -e '.Mode' >/dev/null
+ echo "$output" | jq -e '.RetainUntilDate' >/dev/null
+}
diff --git a/test/suites/object-storage/tagging.bats b/test/suites/object-storage/tagging.bats
new file mode 100644
index 0000000000..c3780f41f2
--- /dev/null
+++ b/test/suites/object-storage/tagging.bats
@@ -0,0 +1,112 @@
+#!/usr/bin/env bats
+
+# paths: commands/object-storage/*
+
+load '../setup.bats'
+
+
+setup_file() {
+ if [[ -z "$IONOS_S3_ACCESS_KEY" || -z "$IONOS_S3_SECRET_KEY" ]]; then
+ echo "IONOS_S3_ACCESS_KEY and IONOS_S3_SECRET_KEY must be set for object storage e2e tests" >&2
+ return 1
+ fi
+
+ export TEST_REGION="${IONOS_S3_TEST_REGION:-eu-central-3}"
+ export TEST_BUCKET_NAME="ionosctl-ci-tag-$(randStr 8 | tr '[:upper:]' '[:lower:]')"
+
+ run ionosctl object-storage bucket create --name "$TEST_BUCKET_NAME" --location "$TEST_REGION"
+ assert_success
+
+ echo "created test bucket for tagging tests: $TEST_BUCKET_NAME"
+}
+
+teardown_file() {
+ if [[ -n "$TEST_BUCKET_NAME" ]]; then
+ run ionosctl object-storage bucket tagging delete --name "$TEST_BUCKET_NAME" -f
+ run ionosctl object-storage object delete --name "$TEST_BUCKET_NAME" --all -f
+ run ionosctl object-storage bucket delete --name "$TEST_BUCKET_NAME" -f
+ fi
+}
+
+# --- validation ---
+
+@test "object-storage bucket tagging get: missing --name flag returns error" {
+ run ionosctl object-storage bucket tagging get
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket tagging put: missing --name flag returns error" {
+ run ionosctl object-storage bucket tagging put
+ assert_failure
+}
+
+@test "object-storage bucket tagging put: missing --json-properties returns error" {
+ run ionosctl object-storage bucket tagging put --name some-bucket
+ assert_failure
+}
+
+@test "object-storage bucket tagging delete: missing --name flag returns error" {
+ run ionosctl object-storage bucket tagging delete
+ assert_failure
+ assert_stderr -p "requires at least 1 option"
+}
+
+@test "object-storage bucket tagging get: missing S3 credentials returns error" {
+ run env -u IONOS_S3_ACCESS_KEY -u IONOS_S3_SECRET_KEY \
+ ionosctl object-storage bucket tagging get --name some-bucket
+ assert_failure
+ assert_stderr -p "object storage credentials not found"
+}
+
+@test "object-storage bucket tagging put: --json-properties-example prints example JSON" {
+ run ionosctl object-storage bucket tagging put --json-properties-example
+ assert_success
+ assert_output -p "TagSet"
+ assert_output -p "Environment"
+}
+
+@test "object-storage bucket tagging put: nonexistent file returns error" {
+ run ionosctl object-storage bucket tagging put --name "$TEST_BUCKET_NAME" --json-properties "/tmp/nonexistent-tags.json"
+ assert_failure
+}
+
+# --- lifecycle: put, get, delete ---
+
+@test "object-storage bucket tagging put: apply tags" {
+ local tmpfile="$(mktemp)"
+ cat > "$tmpfile" </dev/null
+ echo "$output" | jq -e '.items[0].Value // .[0].Value' >/dev/null
+}
+
+@test "object-storage bucket tagging delete: remove tags" {
+ run ionosctl object-storage bucket tagging delete --name "$TEST_BUCKET_NAME" -f
+ assert_success
+ assert_output -p "deleted successfully"
+}
+
+@test "object-storage bucket tagging get: after delete returns error" {
+ run ionosctl object-storage bucket tagging get --name "$TEST_BUCKET_NAME"
+ assert_failure
+}
diff --git a/test/suites/setup.bats b/test/suites/setup.bats
index 4cc70fab76..dc9d40f7fd 100644
--- a/test/suites/setup.bats
+++ b/test/suites/setup.bats
@@ -64,6 +64,12 @@ setup() {
}
run() {
+ # In setup_file/teardown_file, BATS_TEST_TMPDIR is unset and --separate-stderr fails.
+ # Fall back to original run behavior outside test functions.
+ if [[ -z "${BATS_TEST_TMPDIR:-}" ]]; then
+ __bats_original_run "$@"
+ return
+ fi
skip_if_suite_failed
__bats_original_run --separate-stderr "$@"
if [[ "$status" -ne 0 ]]; then
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/.gitignore b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/.gitignore
new file mode 100644
index 0000000000..daf913b1b3
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/.gitignore
@@ -0,0 +1,24 @@
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# Folders
+_obj
+_test
+
+# Architecture specific extensions/prefixes
+*.[568vq]
+[568vq].out
+
+*.cgo1.go
+*.cgo2.c
+_cgo_defun.c
+_cgo_gotypes.go
+_cgo_export.*
+
+_testmain.go
+
+*.exe
+*.test
+*.prof
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/.travis.yml b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/.travis.yml
new file mode 100644
index 0000000000..f5cb2ce9a5
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/.travis.yml
@@ -0,0 +1,8 @@
+language: go
+
+install:
+ - go get -d -v .
+
+script:
+ - go build -v ./
+
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/LICENSE b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/LICENSE
new file mode 100644
index 0000000000..261eeb9e9f
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/README.md b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/README.md
new file mode 100644
index 0000000000..8d41c891cc
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/README.md
@@ -0,0 +1,282 @@
+[](https://gitter.im/ionos-cloud/sdk-general)
+
+# Go API client for objectstorage
+
+## Overview
+The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with
+IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless
+compatibility with existing tools and libraries tailored for S3 systems.
+
+### API References
+- [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/)
+### User documentation
+[IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage)
+* [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets)
+* [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility)
+* [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools)
+
+## Endpoints for contract-owned buckets
+| Location | Region Name | Bucket Type | Endpoint |
+| --- | --- | --- | --- |
+| **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` |
+
+## Changelog
+- 30.05.2024 Initial version
+
+
+## Overview
+This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
+
+- API version: 2.0.2
+- Package version: products/objectstorage/v2.0.3
+- Build package: org.openapitools.codegen.languages.GoClientCodegen
+For more information, please visit [https://docs.ionos.com/support/general-information/contact-information](https://docs.ionos.com/support/general-information/contact-information)
+
+## Installation
+
+Install the following dependencies:
+
+```shell
+go get github.com/stretchr/testify/assert
+go get golang.org/x/oauth2
+go get golang.org/x/net/context
+go get github.com/antihax/optional
+```
+
+Put the package under your project folder and add the following in import:
+
+```golang
+import "./objectstorage"
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *https://s3.eu-central-3.ionoscloud.com*
+
+ API Endpoints table
+
+
+| Class | Method | HTTP request | Description |
+| ------------- | ------------- | ------------- | ------------- |
+| BucketsApi | [**CreateBucket**](docs/api/BucketsApi.md#CreateBucket) | **Put** /{Bucket} | CreateBucket |
+| BucketsApi | [**DeleteBucket**](docs/api/BucketsApi.md#DeleteBucket) | **Delete** /{Bucket} | DeleteBucket |
+| BucketsApi | [**GetBucketLocation**](docs/api/BucketsApi.md#GetBucketLocation) | **Get** /{Bucket}?location | GetBucketLocation |
+| BucketsApi | [**HeadBucket**](docs/api/BucketsApi.md#HeadBucket) | **Head** /{Bucket} | HeadBucket |
+| BucketsApi | [**ListBuckets**](docs/api/BucketsApi.md#ListBuckets) | **Get** / | ListBuckets |
+| CORSApi | [**DeleteBucketCors**](docs/api/CORSApi.md#DeleteBucketCors) | **Delete** /{Bucket}?cors | DeleteBucketCors |
+| CORSApi | [**GetBucketCors**](docs/api/CORSApi.md#GetBucketCors) | **Get** /{Bucket}?cors | GetBucketCors |
+| CORSApi | [**PutBucketCors**](docs/api/CORSApi.md#PutBucketCors) | **Put** /{Bucket}?cors | PutBucketCors |
+| EncryptionApi | [**DeleteBucketEncryption**](docs/api/EncryptionApi.md#DeleteBucketEncryption) | **Delete** /{Bucket}?encryption | DeleteBucketEncryption |
+| EncryptionApi | [**GetBucketEncryption**](docs/api/EncryptionApi.md#GetBucketEncryption) | **Get** /{Bucket}?encryption | GetBucketEncryption |
+| EncryptionApi | [**PutBucketEncryption**](docs/api/EncryptionApi.md#PutBucketEncryption) | **Put** /{Bucket}?encryption | PutBucketEncryption |
+| LifecycleApi | [**DeleteBucketLifecycle**](docs/api/LifecycleApi.md#DeleteBucketLifecycle) | **Delete** /{Bucket}?lifecycle | DeleteBucketLifecycle |
+| LifecycleApi | [**GetBucketLifecycle**](docs/api/LifecycleApi.md#GetBucketLifecycle) | **Get** /{Bucket}?lifecycle | GetBucketLifecycle |
+| LifecycleApi | [**PutBucketLifecycle**](docs/api/LifecycleApi.md#PutBucketLifecycle) | **Put** /{Bucket}?lifecycle | PutBucketLifecycle |
+| ObjectLockApi | [**GetObjectLegalHold**](docs/api/ObjectLockApi.md#GetObjectLegalHold) | **Get** /{Bucket}/{Key}?legal-hold | GetObjectLegalHold |
+| ObjectLockApi | [**GetObjectLockConfiguration**](docs/api/ObjectLockApi.md#GetObjectLockConfiguration) | **Get** /{Bucket}?object-lock | GetObjectLockConfiguration |
+| ObjectLockApi | [**GetObjectRetention**](docs/api/ObjectLockApi.md#GetObjectRetention) | **Get** /{Bucket}/{Key}?retention | GetObjectRetention |
+| ObjectLockApi | [**PutObjectLegalHold**](docs/api/ObjectLockApi.md#PutObjectLegalHold) | **Put** /{Bucket}/{Key}?legal-hold | PutObjectLegalHold |
+| ObjectLockApi | [**PutObjectLockConfiguration**](docs/api/ObjectLockApi.md#PutObjectLockConfiguration) | **Put** /{Bucket}?object-lock | PutObjectLockConfiguration |
+| ObjectLockApi | [**PutObjectRetention**](docs/api/ObjectLockApi.md#PutObjectRetention) | **Put** /{Bucket}/{Key}?retention | PutObjectRetention |
+| ObjectsApi | [**CopyObject**](docs/api/ObjectsApi.md#CopyObject) | **Put** /{Bucket}/{Key}?x-amz-copy-source | CopyObject |
+| ObjectsApi | [**DeleteObject**](docs/api/ObjectsApi.md#DeleteObject) | **Delete** /{Bucket}/{Key} | DeleteObject |
+| ObjectsApi | [**DeleteObjects**](docs/api/ObjectsApi.md#DeleteObjects) | **Post** /{Bucket}?delete | DeleteObjects |
+| ObjectsApi | [**GetObject**](docs/api/ObjectsApi.md#GetObject) | **Get** /{Bucket}/{Key} | GetObject |
+| ObjectsApi | [**HeadObject**](docs/api/ObjectsApi.md#HeadObject) | **Head** /{Bucket}/{Key} | HeadObject |
+| ObjectsApi | [**ListObjects**](docs/api/ObjectsApi.md#ListObjects) | **Get** /{Bucket} | ListObjects |
+| ObjectsApi | [**ListObjectsV2**](docs/api/ObjectsApi.md#ListObjectsV2) | **Get** /{Bucket}?list-type=2 | ListObjectsV2 |
+| ObjectsApi | [**OPTIONSObject**](docs/api/ObjectsApi.md#OPTIONSObject) | **Options** /{Bucket} | OPTIONSObject |
+| ObjectsApi | [**POSTObject**](docs/api/ObjectsApi.md#POSTObject) | **Post** /{Bucket}/{Key} | POSTObject |
+| ObjectsApi | [**PutObject**](docs/api/ObjectsApi.md#PutObject) | **Put** /{Bucket}/{Key} | PutObject |
+| PolicyApi | [**DeleteBucketPolicy**](docs/api/PolicyApi.md#DeleteBucketPolicy) | **Delete** /{Bucket}?policy | DeleteBucketPolicy |
+| PolicyApi | [**GetBucketPolicy**](docs/api/PolicyApi.md#GetBucketPolicy) | **Get** /{Bucket}?policy | GetBucketPolicy |
+| PolicyApi | [**GetBucketPolicyStatus**](docs/api/PolicyApi.md#GetBucketPolicyStatus) | **Get** /{Bucket}?policyStatus | GetBucketPolicyStatus |
+| PolicyApi | [**PutBucketPolicy**](docs/api/PolicyApi.md#PutBucketPolicy) | **Put** /{Bucket}?policy | PutBucketPolicy |
+| PublicAccessBlockApi | [**DeletePublicAccessBlock**](docs/api/PublicAccessBlockApi.md#DeletePublicAccessBlock) | **Delete** /{Bucket}?publicAccessBlock | DeletePublicAccessBlock |
+| PublicAccessBlockApi | [**GetPublicAccessBlock**](docs/api/PublicAccessBlockApi.md#GetPublicAccessBlock) | **Get** /{Bucket}?publicAccessBlock | GetPublicAccessBlock |
+| PublicAccessBlockApi | [**PutPublicAccessBlock**](docs/api/PublicAccessBlockApi.md#PutPublicAccessBlock) | **Put** /{Bucket}?publicAccessBlock | PutPublicAccessBlock |
+| ReplicationApi | [**GetBucketReplication**](docs/api/ReplicationApi.md#GetBucketReplication) | **Get** /{Bucket}?replication | GetBucketReplication |
+| TaggingApi | [**DeleteBucketTagging**](docs/api/TaggingApi.md#DeleteBucketTagging) | **Delete** /{Bucket}?tagging | DeleteBucketTagging |
+| TaggingApi | [**DeleteObjectTagging**](docs/api/TaggingApi.md#DeleteObjectTagging) | **Delete** /{Bucket}/{Key}?tagging | DeleteObjectTagging |
+| TaggingApi | [**GetBucketTagging**](docs/api/TaggingApi.md#GetBucketTagging) | **Get** /{Bucket}?tagging | GetBucketTagging |
+| TaggingApi | [**GetObjectTagging**](docs/api/TaggingApi.md#GetObjectTagging) | **Get** /{Bucket}/{Key}?tagging | GetObjectTagging |
+| TaggingApi | [**PutBucketTagging**](docs/api/TaggingApi.md#PutBucketTagging) | **Put** /{Bucket}?tagging | PutBucketTagging |
+| TaggingApi | [**PutObjectTagging**](docs/api/TaggingApi.md#PutObjectTagging) | **Put** /{Bucket}/{Key}?tagging | PutObjectTagging |
+| UploadsApi | [**AbortMultipartUpload**](docs/api/UploadsApi.md#AbortMultipartUpload) | **Delete** /{Bucket}/{Key}?uploadId | AbortMultipartUpload |
+| UploadsApi | [**CompleteMultipartUpload**](docs/api/UploadsApi.md#CompleteMultipartUpload) | **Post** /{Bucket}/{Key}?uploadId | CompleteMultipartUpload |
+| UploadsApi | [**CreateMultipartUpload**](docs/api/UploadsApi.md#CreateMultipartUpload) | **Post** /{Bucket}/{Key}?uploads | CreateMultipartUpload |
+| UploadsApi | [**ListMultipartUploads**](docs/api/UploadsApi.md#ListMultipartUploads) | **Get** /{Bucket}?uploads | ListMultipartUploads |
+| UploadsApi | [**ListParts**](docs/api/UploadsApi.md#ListParts) | **Get** /{Bucket}/{Key}?uploadId | ListParts |
+| UploadsApi | [**UploadPart**](docs/api/UploadsApi.md#UploadPart) | **Put** /{Bucket}/{Key}?uploadId | UploadPart |
+| UploadsApi | [**UploadPartCopy**](docs/api/UploadsApi.md#UploadPartCopy) | **Put** /{Bucket}/{Key}?x-amz-copy-source&partNumber&uploadId | UploadPartCopy |
+| VersioningApi | [**GetBucketVersioning**](docs/api/VersioningApi.md#GetBucketVersioning) | **Get** /{Bucket}?versioning | GetBucketVersioning |
+| VersioningApi | [**PutBucketVersioning**](docs/api/VersioningApi.md#PutBucketVersioning) | **Put** /{Bucket}?versioning | PutBucketVersioning |
+| VersionsApi | [**ListObjectVersions**](docs/api/VersionsApi.md#ListObjectVersions) | **Get** /{Bucket}?versions | ListObjectVersions |
+| WebsiteApi | [**DeleteBucketWebsite**](docs/api/WebsiteApi.md#DeleteBucketWebsite) | **Delete** /{Bucket}?website | DeleteBucketWebsite |
+| WebsiteApi | [**GetBucketWebsite**](docs/api/WebsiteApi.md#GetBucketWebsite) | **Get** /{Bucket}?website | GetBucketWebsite |
+| WebsiteApi | [**PutBucketWebsite**](docs/api/WebsiteApi.md#PutBucketWebsite) | **Put** /{Bucket}?website | PutBucketWebsite |
+
+
+
+---
+
+## Authentication
+
+All available server URLs are:
+
+- *https://s3.eu-central-3.ionoscloud.com* - The endpoint for the `eu-central-3` region (Berlin, Germany)
+- *https://s3.eu-central-4.ionoscloud.com* - The endpoint for the `eu-central-4` region (Frankfurt, Germany)
+- *https://s3.us-central-1.ionoscloud.com* - The endpoint for the `us-central-1` region (Lenexa, USA)
+
+By default, *https://s3.eu-central-3.ionoscloud.com* is used, however this can be overriden at authentication, either
+by setting the `IONOS_API_URL` environment variable or by specifying the `hostUrl` parameter when
+initializing the sdk client.
+
+**NOTE**: We recommend passing the URL without the `https://` or `http://` prefix. The SDK
+checks and adds it if necessary when configurations are created using `NewConfiguration` or
+`NewConfigurationFromEnv`. This is to avoid issues caused by typos in the prefix that cannot
+ be easily detected and debugged.
+
+In order to authenticate, the only credentials needed are the IONOS S3 access and secret keys,
+username and password or token are not required. Also, a middleware function needs to be added
+to the configuration to sign the requests with the IONOS S3 credentials.
+
+```golang
+configuration := shared.NewConfiguration("", "", "", hostUrl)
+configuration.MiddlewareWithError = shared.SignerMiddleware(region, "s3", s3AccessKey, s3SecretKey)
+client := objectstorage.NewAPIClient(configuration)
+
+```
+
+Environment variables can also be used. The sdk uses the following variables:
+- IONOS_S3_ACCESS_KEY - the access key for the IONOS object storage
+- IONOS_S3_SECRET_KEY - the secret key for the IONOS object storage
+- IONOS_API_URL - to specify the API server URL
+
+In this case, the client configuration needs to be initialized using `NewConfigurationFromEnv()`.
+
+```golang
+configuration := shared.NewConfigurationFromEnv()
+configuration.MiddlewareWithError = shared.SignerMiddleware(
+ region, "s3", os.Getenv(IonosS3AccessKeyEnvVar), os.Getenv(IonosS3SecretKeyEnvVar),
+)
+client := objectstorage.NewAPIClient(configuration)
+
+```
+
+
+## Documentation For Models
+
+All URIs are relative to *https://s3.eu-central-3.ionoscloud.com*
+
+API models list
+
+ - [AbortIncompleteMultipartUpload](docs/models/AbortIncompleteMultipartUpload)
+ - [BlockPublicAccessOutput](docs/models/BlockPublicAccessOutput)
+ - [BlockPublicAccessPayload](docs/models/BlockPublicAccessPayload)
+ - [Bucket](docs/models/Bucket)
+ - [BucketLocation](docs/models/BucketLocation)
+ - [BucketPolicy](docs/models/BucketPolicy)
+ - [BucketPolicyCondition](docs/models/BucketPolicyCondition)
+ - [BucketPolicyConditionDate](docs/models/BucketPolicyConditionDate)
+ - [BucketPolicyConditionIpAddress](docs/models/BucketPolicyConditionIpAddress)
+ - [BucketPolicyStatement](docs/models/BucketPolicyStatement)
+ - [BucketVersioningStatus](docs/models/BucketVersioningStatus)
+ - [CORSRule](docs/models/CORSRule)
+ - [CSVInput](docs/models/CSVInput)
+ - [CSVOutput](docs/models/CSVOutput)
+ - [CommonPrefix](docs/models/CommonPrefix)
+ - [CompleteMultipartUploadOutput](docs/models/CompleteMultipartUploadOutput)
+ - [CompletedPart](docs/models/CompletedPart)
+ - [CopyObjectRequest](docs/models/CopyObjectRequest)
+ - [CopyObjectResult](docs/models/CopyObjectResult)
+ - [CopyPartResult](docs/models/CopyPartResult)
+ - [CreateBucketConfiguration](docs/models/CreateBucketConfiguration)
+ - [CreateMultipartUploadOutput](docs/models/CreateMultipartUploadOutput)
+ - [DefaultRetention](docs/models/DefaultRetention)
+ - [DeleteMarkerEntry](docs/models/DeleteMarkerEntry)
+ - [DeleteObjectsOutput](docs/models/DeleteObjectsOutput)
+ - [DeleteObjectsRequest](docs/models/DeleteObjectsRequest)
+ - [DeletedObject](docs/models/DeletedObject)
+ - [DeletionError](docs/models/DeletionError)
+ - [Destination](docs/models/Destination)
+ - [EncodingType](docs/models/EncodingType)
+ - [Encryption](docs/models/Encryption)
+ - [Error](docs/models/Error)
+ - [ErrorDocument](docs/models/ErrorDocument)
+ - [Example](docs/models/Example)
+ - [ExampleCompleteMultipartUpload](docs/models/ExampleCompleteMultipartUpload)
+ - [ExpirationStatus](docs/models/ExpirationStatus)
+ - [ExpressionType](docs/models/ExpressionType)
+ - [Filter](docs/models/Filter)
+ - [GetBucketCorsOutput](docs/models/GetBucketCorsOutput)
+ - [GetBucketLifecycleOutput](docs/models/GetBucketLifecycleOutput)
+ - [GetBucketReplicationOutput](docs/models/GetBucketReplicationOutput)
+ - [GetBucketTaggingOutput](docs/models/GetBucketTaggingOutput)
+ - [GetBucketVersioningOutput](docs/models/GetBucketVersioningOutput)
+ - [GetBucketWebsiteOutput](docs/models/GetBucketWebsiteOutput)
+ - [GetObjectLockConfigurationOutput](docs/models/GetObjectLockConfigurationOutput)
+ - [GetObjectTaggingOutput](docs/models/GetObjectTaggingOutput)
+ - [HeadObjectOutput](docs/models/HeadObjectOutput)
+ - [IndexDocument](docs/models/IndexDocument)
+ - [Initiator](docs/models/Initiator)
+ - [InputSerialization](docs/models/InputSerialization)
+ - [InputSerializationJSON](docs/models/InputSerializationJSON)
+ - [JSONOutput](docs/models/JSONOutput)
+ - [LifecycleExpiration](docs/models/LifecycleExpiration)
+ - [ListAllMyBucketsResult](docs/models/ListAllMyBucketsResult)
+ - [ListBucketResultV2](docs/models/ListBucketResultV2)
+ - [ListMultipartUploadsOutput](docs/models/ListMultipartUploadsOutput)
+ - [ListObjectVersionsOutput](docs/models/ListObjectVersionsOutput)
+ - [ListObjectsOutput](docs/models/ListObjectsOutput)
+ - [ListPartsOutput](docs/models/ListPartsOutput)
+ - [MetadataEntry](docs/models/MetadataEntry)
+ - [MfaDeleteStatus](docs/models/MfaDeleteStatus)
+ - [MultipartUpload](docs/models/MultipartUpload)
+ - [NoncurrentVersionExpiration](docs/models/NoncurrentVersionExpiration)
+ - [Object](docs/models/Object)
+ - [ObjectIdentifier](docs/models/ObjectIdentifier)
+ - [ObjectLegalHoldConfiguration](docs/models/ObjectLegalHoldConfiguration)
+ - [ObjectLockRetention](docs/models/ObjectLockRetention)
+ - [ObjectLockRule](docs/models/ObjectLockRule)
+ - [ObjectStorageClass](docs/models/ObjectStorageClass)
+ - [ObjectVersion](docs/models/ObjectVersion)
+ - [ObjectVersionStorageClass](docs/models/ObjectVersionStorageClass)
+ - [OutputSerialization](docs/models/OutputSerialization)
+ - [Owner](docs/models/Owner)
+ - [POSTObjectRequest](docs/models/POSTObjectRequest)
+ - [Part](docs/models/Part)
+ - [PolicyStatus](docs/models/PolicyStatus)
+ - [Principal](docs/models/Principal)
+ - [PrincipalAllOf](docs/models/PrincipalAllOf)
+ - [PutBucketCorsRequest](docs/models/PutBucketCorsRequest)
+ - [PutBucketEncryptionRequest](docs/models/PutBucketEncryptionRequest)
+ - [PutBucketLifecycleRequest](docs/models/PutBucketLifecycleRequest)
+ - [PutBucketTaggingRequest](docs/models/PutBucketTaggingRequest)
+ - [PutBucketVersioningRequest](docs/models/PutBucketVersioningRequest)
+ - [PutBucketWebsiteRequest](docs/models/PutBucketWebsiteRequest)
+ - [PutObjectLockConfigurationRequest](docs/models/PutObjectLockConfigurationRequest)
+ - [PutObjectLockConfigurationRequestRule](docs/models/PutObjectLockConfigurationRequestRule)
+ - [PutObjectRetentionRequest](docs/models/PutObjectRetentionRequest)
+ - [PutObjectTaggingRequest](docs/models/PutObjectTaggingRequest)
+ - [Redirect](docs/models/Redirect)
+ - [RedirectAllRequestsTo](docs/models/RedirectAllRequestsTo)
+ - [ReplicaModificationsStatus](docs/models/ReplicaModificationsStatus)
+ - [ReplicationConfiguration](docs/models/ReplicationConfiguration)
+ - [ReplicationRule](docs/models/ReplicationRule)
+ - [RoutingRule](docs/models/RoutingRule)
+ - [RoutingRuleCondition](docs/models/RoutingRuleCondition)
+ - [Rule](docs/models/Rule)
+ - [ServerSideEncryption](docs/models/ServerSideEncryption)
+ - [ServerSideEncryptionByDefault](docs/models/ServerSideEncryptionByDefault)
+ - [ServerSideEncryptionConfiguration](docs/models/ServerSideEncryptionConfiguration)
+ - [ServerSideEncryptionRule](docs/models/ServerSideEncryptionRule)
+ - [StorageClass](docs/models/StorageClass)
+ - [Tag](docs/models/Tag)
+ - [UploadPartCopyOutput](docs/models/UploadPartCopyOutput)
+ - [UploadPartRequest](docs/models/UploadPartRequest)
+
+
+[[Back to API list]](#documentation-for-api-endpoints) [[Back to Model list]](#documentation-for-models)
+
+
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_buckets.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_buckets.go
new file mode 100644
index 0000000000..41616bb148
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_buckets.go
@@ -0,0 +1,812 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// BucketsApiService BucketsApi service
+type BucketsApiService service
+
+type ApiCreateBucketRequest struct {
+ ctx context.Context
+ ApiService *BucketsApiService
+ bucket string
+ createBucketConfiguration *CreateBucketConfiguration
+ xAmzBucketObjectLockEnabled *bool
+}
+
+func (r ApiCreateBucketRequest) CreateBucketConfiguration(createBucketConfiguration CreateBucketConfiguration) ApiCreateBucketRequest {
+ r.createBucketConfiguration = &createBucketConfiguration
+ return r
+}
+
+// Specifies whether you want S3 Object Lock enabled for the new bucket. After bucket creation, you must apply the [Object Lock configuration](#tag/Object-Lock/operation/PutObjectLockConfiguration).
+func (r ApiCreateBucketRequest) XAmzBucketObjectLockEnabled(xAmzBucketObjectLockEnabled bool) ApiCreateBucketRequest {
+ r.xAmzBucketObjectLockEnabled = &xAmzBucketObjectLockEnabled
+ return r
+}
+
+func (r ApiCreateBucketRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.CreateBucketExecute(r)
+}
+
+/*
+CreateBucket CreateBucket
+
+Creates a new Object Storage bucket.
+
+To create a bucket, you must register with IONOS Object Storage and have a valid Access Key ID to
+authenticate requests.
+
+Not every string is an acceptable bucket name. For information about bucket
+naming restrictions, see [Bucket naming rules](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets#naming-conventions).
+
+Buckets are created in the location specified in the endpoint used to make the request.
+Once a bucket is created, it can be accessed at that location. Any requests
+targeting an existing bucket using an endpoint with an incorrect location will result in a `404 NoSuchkey`.
+
+### Permissions
+Any user of the contract is allowed to create a bucket. But further operations with the bucket
+must be allowed by [Bucket Policy](#tag/Policy/operation/PutBucketPolicy) which must be set by the contract owner or an administrator.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiCreateBucketRequest
+*/
+func (a *BucketsApiService) CreateBucket(ctx context.Context, bucket string) ApiCreateBucketRequest {
+ return ApiCreateBucketRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *BucketsApiService) CreateBucketExecute(r ApiCreateBucketRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketsApiService.CreateBucket")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.createBucketConfiguration == nil {
+ return nil, reportError("createBucketConfiguration is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xAmzBucketObjectLockEnabled != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-bucket-object-lock-enabled", r.xAmzBucketObjectLockEnabled, "")
+ }
+ // body params
+ localVarPostBody = r.createBucketConfiguration
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "CreateBucket",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 409 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiDeleteBucketRequest struct {
+ ctx context.Context
+ ApiService *BucketsApiService
+ bucket string
+}
+
+func (r ApiDeleteBucketRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.DeleteBucketExecute(r)
+}
+
+/*
+DeleteBucket DeleteBucket
+
+Deletes the bucket. All objects (including all object versions and
+delete markers) in the bucket must be deleted before the bucket itself
+can be deleted.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:DeleteBucket` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeleteBucketRequest
+*/
+func (a *BucketsApiService) DeleteBucket(ctx context.Context, bucket string) ApiDeleteBucketRequest {
+ return ApiDeleteBucketRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *BucketsApiService) DeleteBucketExecute(r ApiDeleteBucketRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketsApiService.DeleteBucket")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteBucket",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiGetBucketLocationRequest struct {
+ ctx context.Context
+ ApiService *BucketsApiService
+ bucket string
+}
+
+func (r ApiGetBucketLocationRequest) Execute() (*BucketLocation, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketLocationExecute(r)
+}
+
+/*
+GetBucketLocation GetBucketLocation
+
+Returns the region the bucket resides in.
+
+#### Permissions
+This operation is available for all users of the contract.
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketLocationRequest
+*/
+func (a *BucketsApiService) GetBucketLocation(ctx context.Context, bucket string) ApiGetBucketLocationRequest {
+ return ApiGetBucketLocationRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return BucketLocation
+func (a *BucketsApiService) GetBucketLocationExecute(r ApiGetBucketLocationRequest) (*BucketLocation, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *BucketLocation
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketsApiService.GetBucketLocation")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?location"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketLocation",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiHeadBucketRequest struct {
+ ctx context.Context
+ ApiService *BucketsApiService
+ bucket string
+}
+
+func (r ApiHeadBucketRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.HeadBucketExecute(r)
+}
+
+/*
+HeadBucket HeadBucket
+
+Retrieves metadata and verifies the existence of a specific bucket. This operation checks for the presence
+of the specified bucket without returning the actual content of the bucket.
+
+Bucket names are globally unique across all users of the service. If the bucket exists and the requester
+has permission to access it, the server returns a `200 OK` HTTP status code with no accompanying response body.
+If the bucket does not exist or if the requester does not have permission to access it, the server returns a relevant error code:
+- `403 Forbidden`: The requester does not have permission to access the bucket.
+- `404 Not Found`: The bucket does not exist.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:ListBucket` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiHeadBucketRequest
+*/
+func (a *BucketsApiService) HeadBucket(ctx context.Context, bucket string) ApiHeadBucketRequest {
+ return ApiHeadBucketRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *BucketsApiService) HeadBucketExecute(r ApiHeadBucketRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodHead
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketsApiService.HeadBucket")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "HeadBucket",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiListBucketsRequest struct {
+ ctx context.Context
+ ApiService *BucketsApiService
+}
+
+func (r ApiListBucketsRequest) Execute() (*ListAllMyBucketsResult, *shared.APIResponse, error) {
+ return r.ApiService.ListBucketsExecute(r)
+}
+
+/*
+ListBuckets ListBuckets
+
+Lists all the buckets of the contract.
+
+#### Permissions
+This operation is available for all users of the contract.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @return ApiListBucketsRequest
+*/
+func (a *BucketsApiService) ListBuckets(ctx context.Context) ApiListBucketsRequest {
+ return ApiListBucketsRequest{
+ ApiService: a,
+ ctx: ctx,
+ }
+}
+
+// Execute executes the request
+//
+// @return ListAllMyBucketsResult
+func (a *BucketsApiService) ListBucketsExecute(r ApiListBucketsRequest) (*ListAllMyBucketsResult, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ListAllMyBucketsResult
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BucketsApiService.ListBuckets")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/"
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "ListBuckets",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_cors.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_cors.go
new file mode 100644
index 0000000000..2985ce19cf
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_cors.go
@@ -0,0 +1,427 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// CORSApiService CORSApi service
+type CORSApiService service
+
+type ApiDeleteBucketCorsRequest struct {
+ ctx context.Context
+ ApiService *CORSApiService
+ bucket string
+}
+
+func (r ApiDeleteBucketCorsRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.DeleteBucketCorsExecute(r)
+}
+
+/*
+DeleteBucketCors DeleteBucketCors
+
+Deletes the `CORS` configuration information set for the bucket.
To use this operation, you must have permission to perform the `PutBucketCORS` operation. The bucket owner has this permission by default and can grant this permission to others.
+#### S3 API Compatibility - The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeleteBucketCorsRequest
+*/
+func (a *CORSApiService) DeleteBucketCors(ctx context.Context, bucket string) ApiDeleteBucketCorsRequest {
+ return ApiDeleteBucketCorsRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *CORSApiService) DeleteBucketCorsExecute(r ApiDeleteBucketCorsRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CORSApiService.DeleteBucketCors")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?cors"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteBucketCors",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiGetBucketCorsRequest struct {
+ ctx context.Context
+ ApiService *CORSApiService
+ bucket string
+}
+
+func (r ApiGetBucketCorsRequest) Execute() (*GetBucketCorsOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketCorsExecute(r)
+}
+
+/*
+GetBucketCors GetBucketCors
+
+Returns the cors configuration information set for the bucket.
+To use this operation, you must have permission to perform the GetBucketCORS operation. By default, the bucket owner has this permission and can grant it to others.
+#### S3 API Compatibility - The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketCorsRequest
+*/
+func (a *CORSApiService) GetBucketCors(ctx context.Context, bucket string) ApiGetBucketCorsRequest {
+ return ApiGetBucketCorsRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetBucketCorsOutput
+func (a *CORSApiService) GetBucketCorsExecute(r ApiGetBucketCorsRequest) (*GetBucketCorsOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetBucketCorsOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CORSApiService.GetBucketCors")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?cors"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketCors",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutBucketCorsRequest struct {
+ ctx context.Context
+ ApiService *CORSApiService
+ bucket string
+ putBucketCorsRequest *PutBucketCorsRequest
+ contentMD5 *string
+}
+
+func (r ApiPutBucketCorsRequest) PutBucketCorsRequest(putBucketCorsRequest PutBucketCorsRequest) ApiPutBucketCorsRequest {
+ r.putBucketCorsRequest = &putBucketCorsRequest
+ return r
+}
+
+func (r ApiPutBucketCorsRequest) ContentMD5(contentMD5 string) ApiPutBucketCorsRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutBucketCorsRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutBucketCorsExecute(r)
+}
+
+/*
+PutBucketCors PutBucketCors
+
+Sets the `CORS` configuration for your bucket. If the configuration exists, it will be overwritten and replaced.
To use this operation, you must be allowed to perform the `PutBucketCORS` operation. By default, the bucket owner has this permission and can grant it to others.
You set this configuration on a bucket so that the bucket can service cross-origin requests. For example, you might want to enable a request whose origin is `http://www.example.com` to access your IONOS Object Storage bucket at `my.example.bucket.com` by using the browser's `XMLHttpRequest` capability.
To enable cross-origin resource sharing (CORS) on a bucket, you add the `cors` subresource to the bucket. The `cors` subresource is an XML document in which you configure rules that identify origins and the HTTP methods that can be executed on your bucket. The document is limited to 64 KB in size.
When IONOS Object Storage receives a cross-origin request (or a pre-flight OPTIONS request) against a bucket, it evaluates the `cors` configuration on the bucket and uses the first `CORSRule` rule that matches the incoming browser request to enable a cross-origin request. For a rule to match, the following conditions must be met:
-
The request's `Origin` header must match `AllowedOrigin` elements.
-
The request method (for example, GET, PUT, HEAD, and so on) or the `Access-Control-Request-Method` header in case of a pre-flight `OPTIONS` request must be one of the `AllowedMethod` elements.
-
Every header specified in the `Access-Control-Request-Headers` request header of a pre-flight request must match an `AllowedHeader` element.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutBucketCorsRequest
+*/
+func (a *CORSApiService) PutBucketCors(ctx context.Context, bucket string) ApiPutBucketCorsRequest {
+ return ApiPutBucketCorsRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *CORSApiService) PutBucketCorsExecute(r ApiPutBucketCorsRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CORSApiService.PutBucketCors")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?cors"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.putBucketCorsRequest == nil {
+ return nil, reportError("putBucketCorsRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.putBucketCorsRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutBucketCors",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_encryption.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_encryption.go
new file mode 100644
index 0000000000..90d136e3f7
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_encryption.go
@@ -0,0 +1,424 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// EncryptionApiService EncryptionApi service
+type EncryptionApiService service
+
+type ApiDeleteBucketEncryptionRequest struct {
+ ctx context.Context
+ ApiService *EncryptionApiService
+ bucket string
+}
+
+func (r ApiDeleteBucketEncryptionRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.DeleteBucketEncryptionExecute(r)
+}
+
+/*
+DeleteBucketEncryption DeleteBucketEncryption
+
+This implementation of the DELETE operation removes default encryption from the bucket.
In the current version, only the bucket owner is allowed to perform this operation. We currently do not support the use of bucket policies to extend bucket encryption permissions to users other than the bucket owner.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeleteBucketEncryptionRequest
+*/
+func (a *EncryptionApiService) DeleteBucketEncryption(ctx context.Context, bucket string) ApiDeleteBucketEncryptionRequest {
+ return ApiDeleteBucketEncryptionRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *EncryptionApiService) DeleteBucketEncryptionExecute(r ApiDeleteBucketEncryptionRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EncryptionApiService.DeleteBucketEncryption")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?encryption"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteBucketEncryption",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiGetBucketEncryptionRequest struct {
+ ctx context.Context
+ ApiService *EncryptionApiService
+ bucket string
+}
+
+func (r ApiGetBucketEncryptionRequest) Execute() (*ServerSideEncryptionConfiguration, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketEncryptionExecute(r)
+}
+
+/*
+GetBucketEncryption GetBucketEncryption
+
+Returns the default encryption configuration for the bucket.
In the current version, only the bucket owner is allowed to perform this operation. We currently do not support the use of bucket policies to extend bucket encryption permissions to users other than the bucket owner.
If the bucket does not have a default encryption configuration, GetBucketEncryption returns `404 ServerSideEncryptionConfigurationNotFoundError`.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketEncryptionRequest
+*/
+func (a *EncryptionApiService) GetBucketEncryption(ctx context.Context, bucket string) ApiGetBucketEncryptionRequest {
+ return ApiGetBucketEncryptionRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return ServerSideEncryptionConfiguration
+func (a *EncryptionApiService) GetBucketEncryptionExecute(r ApiGetBucketEncryptionRequest) (*ServerSideEncryptionConfiguration, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ServerSideEncryptionConfiguration
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EncryptionApiService.GetBucketEncryption")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?encryption"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketEncryption",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutBucketEncryptionRequest struct {
+ ctx context.Context
+ ApiService *EncryptionApiService
+ bucket string
+ putBucketEncryptionRequest *PutBucketEncryptionRequest
+}
+
+func (r ApiPutBucketEncryptionRequest) PutBucketEncryptionRequest(putBucketEncryptionRequest PutBucketEncryptionRequest) ApiPutBucketEncryptionRequest {
+ r.putBucketEncryptionRequest = &putBucketEncryptionRequest
+ return r
+}
+
+func (r ApiPutBucketEncryptionRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutBucketEncryptionExecute(r)
+}
+
+/*
+PutBucketEncryption PutBucketEncryption
+
+Sets the AES256 server-side encryption for a bucket with IONOS Object Storage managed keys (SSE-S3).
With server-side encryption, S3 encrypts a newly uploaded object in the bucket before saving it to disk and decrypts it when you download the object. Encryption doesn't change the way that you access data as an authorized user. It only further protects your data.
In the current version, only the bucket owner is allowed to perform this operation. We do not currently support the use of bucket policies to extend bucket encryption permissions to users other than the bucket owner.
IONOS Object Storage confirms that your object is stored with SSE-S3 encryption by returning the response header `x-amz-server-side-encryption` for the Object Read operation.
You can also apply encryption with a customer-provided key (SSE-C) to each object at the time of uploading. In this case, SSE-C encryption will override the SSE-S3 encryption.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutBucketEncryptionRequest
+*/
+func (a *EncryptionApiService) PutBucketEncryption(ctx context.Context, bucket string) ApiPutBucketEncryptionRequest {
+ return ApiPutBucketEncryptionRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *EncryptionApiService) PutBucketEncryptionExecute(r ApiPutBucketEncryptionRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EncryptionApiService.PutBucketEncryption")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?encryption"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.putBucketEncryptionRequest == nil {
+ return nil, reportError("putBucketEncryptionRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.putBucketEncryptionRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutBucketEncryption",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_lifecycle.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_lifecycle.go
new file mode 100644
index 0000000000..b33d625f7c
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_lifecycle.go
@@ -0,0 +1,467 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// LifecycleApiService LifecycleApi service
+type LifecycleApiService service
+
+type ApiDeleteBucketLifecycleRequest struct {
+ ctx context.Context
+ ApiService *LifecycleApiService
+ bucket string
+}
+
+func (r ApiDeleteBucketLifecycleRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.DeleteBucketLifecycleExecute(r)
+}
+
+/*
+DeleteBucketLifecycle DeleteBucketLifecycle
+
+Deletes the lifecycle configuration from the specified bucket.
+As a result, objects within the bucket will neither expire nor be automatically deleted based
+on any rules from the deleted configuration.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:PutLifecycleConfiguration` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+**Note:** A brief delay may occur before the lifecycle configuration deletion is fully
+propagated across all IONOS Object Storage systems. During this time, lifecycle rules may remain temporarily active.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeleteBucketLifecycleRequest
+*/
+func (a *LifecycleApiService) DeleteBucketLifecycle(ctx context.Context, bucket string) ApiDeleteBucketLifecycleRequest {
+ return ApiDeleteBucketLifecycleRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *LifecycleApiService) DeleteBucketLifecycleExecute(r ApiDeleteBucketLifecycleRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LifecycleApiService.DeleteBucketLifecycle")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?lifecycle"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteBucketLifecycle",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiGetBucketLifecycleRequest struct {
+ ctx context.Context
+ ApiService *LifecycleApiService
+ bucket string
+}
+
+func (r ApiGetBucketLifecycleRequest) Execute() (*GetBucketLifecycleOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketLifecycleExecute(r)
+}
+
+/*
+GetBucketLifecycle GetBucketLifecycle
+
+Returns the lifecycle configuration for the specified Object Storage bucket.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetLifecycleConfiguration` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketLifecycleRequest
+*/
+func (a *LifecycleApiService) GetBucketLifecycle(ctx context.Context, bucket string) ApiGetBucketLifecycleRequest {
+ return ApiGetBucketLifecycleRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetBucketLifecycleOutput
+func (a *LifecycleApiService) GetBucketLifecycleExecute(r ApiGetBucketLifecycleRequest) (*GetBucketLifecycleOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetBucketLifecycleOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LifecycleApiService.GetBucketLifecycle")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?lifecycle"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketLifecycle",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutBucketLifecycleRequest struct {
+ ctx context.Context
+ ApiService *LifecycleApiService
+ bucket string
+ contentMD5 *string
+ putBucketLifecycleRequest *PutBucketLifecycleRequest
+}
+
+func (r ApiPutBucketLifecycleRequest) ContentMD5(contentMD5 string) ApiPutBucketLifecycleRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutBucketLifecycleRequest) PutBucketLifecycleRequest(putBucketLifecycleRequest PutBucketLifecycleRequest) ApiPutBucketLifecycleRequest {
+ r.putBucketLifecycleRequest = &putBucketLifecycleRequest
+ return r
+}
+
+func (r ApiPutBucketLifecycleRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutBucketLifecycleExecute(r)
+}
+
+/*
+PutBucketLifecycle PutBucketLifecycle
+
+Creates a new lifecycle configuration for a specified bucket, or replaces an existing configuration.
+This lifecycle configuration allows automatic management of the objects within the bucket.
+Typical actions can include the deletion of objects after a certain period or deletion of non-current
+versions of objects.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:PutLifecycleConfiguration` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `NewerNoncurrentVersions` setting is not supported for the `NoncurrentVersionExpiration` option.
+- The `Transition` and the `NoncurrentVersionTransition` options are omitted as only the `STANDARD` storage class is currenly supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutBucketLifecycleRequest
+*/
+func (a *LifecycleApiService) PutBucketLifecycle(ctx context.Context, bucket string) ApiPutBucketLifecycleRequest {
+ return ApiPutBucketLifecycleRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *LifecycleApiService) PutBucketLifecycleExecute(r ApiPutBucketLifecycleRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LifecycleApiService.PutBucketLifecycle")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?lifecycle"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.contentMD5 == nil {
+ return nil, reportError("contentMD5 is required and must be specified")
+ }
+ if r.putBucketLifecycleRequest == nil {
+ return nil, reportError("putBucketLifecycleRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ // body params
+ localVarPostBody = r.putBucketLifecycleRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutBucketLifecycle",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_object_lock.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_object_lock.go
new file mode 100644
index 0000000000..3b493a7774
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_object_lock.go
@@ -0,0 +1,1132 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// ObjectLockApiService ObjectLockApi service
+type ObjectLockApiService service
+
+type ApiGetObjectLegalHoldRequest struct {
+ ctx context.Context
+ ApiService *ObjectLockApiService
+ bucket string
+ key string
+ versionId *string
+}
+
+// The version ID of the object whose Legal Hold status you want to retrieve.
+func (r ApiGetObjectLegalHoldRequest) VersionId(versionId string) ApiGetObjectLegalHoldRequest {
+ r.versionId = &versionId
+ return r
+}
+
+func (r ApiGetObjectLegalHoldRequest) Execute() (*ObjectLegalHoldConfiguration, *shared.APIResponse, error) {
+ return r.ApiService.GetObjectLegalHoldExecute(r)
+}
+
+/*
+GetObjectLegalHold GetObjectLegalHold
+
+Gets an object's current Legal Hold status.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetObjectLegalHold` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key The key name of the object whose Legal Hold status you want to retrieve.
+ @return ApiGetObjectLegalHoldRequest
+*/
+func (a *ObjectLockApiService) GetObjectLegalHold(ctx context.Context, bucket string, key string) ApiGetObjectLegalHoldRequest {
+ return ApiGetObjectLegalHoldRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return ObjectLegalHoldConfiguration
+func (a *ObjectLockApiService) GetObjectLegalHoldExecute(r ApiGetObjectLegalHoldRequest) (*ObjectLegalHoldConfiguration, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ObjectLegalHoldConfiguration
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectLockApiService.GetObjectLegalHold")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?legal-hold"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetObjectLegalHold",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiGetObjectLockConfigurationRequest struct {
+ ctx context.Context
+ ApiService *ObjectLockApiService
+ bucket string
+}
+
+func (r ApiGetObjectLockConfigurationRequest) Execute() (*GetObjectLockConfigurationOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetObjectLockConfigurationExecute(r)
+}
+
+/*
+GetObjectLockConfiguration GetObjectLockConfiguration
+
+Retrieves the Object Lock configuration for a bucket.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetBucketObjectLockConfiguration` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetObjectLockConfigurationRequest
+*/
+func (a *ObjectLockApiService) GetObjectLockConfiguration(ctx context.Context, bucket string) ApiGetObjectLockConfigurationRequest {
+ return ApiGetObjectLockConfigurationRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetObjectLockConfigurationOutput
+func (a *ObjectLockApiService) GetObjectLockConfigurationExecute(r ApiGetObjectLockConfigurationRequest) (*GetObjectLockConfigurationOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetObjectLockConfigurationOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectLockApiService.GetObjectLockConfiguration")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?object-lock"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetObjectLockConfiguration",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiGetObjectRetentionRequest struct {
+ ctx context.Context
+ ApiService *ObjectLockApiService
+ bucket string
+ key string
+ versionId *string
+}
+
+// The version ID of the object whose retention settings you want to retrieve.
+func (r ApiGetObjectRetentionRequest) VersionId(versionId string) ApiGetObjectRetentionRequest {
+ r.versionId = &versionId
+ return r
+}
+
+func (r ApiGetObjectRetentionRequest) Execute() (*ObjectLockRetention, *shared.APIResponse, error) {
+ return r.ApiService.GetObjectRetentionExecute(r)
+}
+
+/*
+GetObjectRetention GetObjectRetention
+
+Retrieves an object's retention configuration.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetObjectRetention` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key The key name of the object whose retention settings you want to retrieve.
+ @return ApiGetObjectRetentionRequest
+*/
+func (a *ObjectLockApiService) GetObjectRetention(ctx context.Context, bucket string, key string) ApiGetObjectRetentionRequest {
+ return ApiGetObjectRetentionRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return ObjectLockRetention
+func (a *ObjectLockApiService) GetObjectRetentionExecute(r ApiGetObjectRetentionRequest) (*ObjectLockRetention, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ObjectLockRetention
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectLockApiService.GetObjectRetention")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?retention"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetObjectRetention",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutObjectLegalHoldRequest struct {
+ ctx context.Context
+ ApiService *ObjectLockApiService
+ bucket string
+ key string
+ objectLegalHoldConfiguration *ObjectLegalHoldConfiguration
+ versionId *string
+ contentMD5 *string
+}
+
+func (r ApiPutObjectLegalHoldRequest) ObjectLegalHoldConfiguration(objectLegalHoldConfiguration ObjectLegalHoldConfiguration) ApiPutObjectLegalHoldRequest {
+ r.objectLegalHoldConfiguration = &objectLegalHoldConfiguration
+ return r
+}
+
+// The version ID of the object on which you want to place a Legal Hold.
+func (r ApiPutObjectLegalHoldRequest) VersionId(versionId string) ApiPutObjectLegalHoldRequest {
+ r.versionId = &versionId
+ return r
+}
+
+func (r ApiPutObjectLegalHoldRequest) ContentMD5(contentMD5 string) ApiPutObjectLegalHoldRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutObjectLegalHoldRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutObjectLegalHoldExecute(r)
+}
+
+/*
+PutObjectLegalHold PutObjectLegalHold
+
+Applies a Legal Hold configuration to the specified object.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:PutObjectLegalHold` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key The key name of the object on which you want to place a Legal Hold.
+ @return ApiPutObjectLegalHoldRequest
+*/
+func (a *ObjectLockApiService) PutObjectLegalHold(ctx context.Context, bucket string, key string) ApiPutObjectLegalHoldRequest {
+ return ApiPutObjectLegalHoldRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+func (a *ObjectLockApiService) PutObjectLegalHoldExecute(r ApiPutObjectLegalHoldRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectLockApiService.PutObjectLegalHold")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?legal-hold"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return nil, reportError("key must have at least 1 elements")
+ }
+ if r.objectLegalHoldConfiguration == nil {
+ return nil, reportError("objectLegalHoldConfiguration is required and must be specified")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.objectLegalHoldConfiguration
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutObjectLegalHold",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiPutObjectLockConfigurationRequest struct {
+ ctx context.Context
+ ApiService *ObjectLockApiService
+ bucket string
+ contentMD5 *string
+ putObjectLockConfigurationRequest *PutObjectLockConfigurationRequest
+}
+
+func (r ApiPutObjectLockConfigurationRequest) ContentMD5(contentMD5 string) ApiPutObjectLockConfigurationRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutObjectLockConfigurationRequest) PutObjectLockConfigurationRequest(putObjectLockConfigurationRequest PutObjectLockConfigurationRequest) ApiPutObjectLockConfigurationRequest {
+ r.putObjectLockConfigurationRequest = &putObjectLockConfigurationRequest
+ return r
+}
+
+func (r ApiPutObjectLockConfigurationRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutObjectLockConfigurationExecute(r)
+}
+
+/*
+PutObjectLockConfiguration PutObjectLockConfiguration
+
+Applies an Object Lock configuration on the specified bucket, which requires
+the Object Lock feature to have been enabled during its creation.
+The rule specified in the Object Lock configuration will be applied by default to
+every new object placed in the specified bucket.
+
+**Note:**
+- An Object Lock Configuration can only be applied to buckets
+with Object Lock enabled.
+- This feature can only be activated on a new bucket
+during its creation.
+- Object Lock cannot be enabled on a bucket that already exists.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:PutBucketObjectLockConfiguration` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutObjectLockConfigurationRequest
+*/
+func (a *ObjectLockApiService) PutObjectLockConfiguration(ctx context.Context, bucket string) ApiPutObjectLockConfigurationRequest {
+ return ApiPutObjectLockConfigurationRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *ObjectLockApiService) PutObjectLockConfigurationExecute(r ApiPutObjectLockConfigurationRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectLockApiService.PutObjectLockConfiguration")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?object-lock"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.contentMD5 == nil {
+ return nil, reportError("contentMD5 is required and must be specified")
+ }
+ if r.putObjectLockConfigurationRequest == nil {
+ return nil, reportError("putObjectLockConfigurationRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ // body params
+ localVarPostBody = r.putObjectLockConfigurationRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutObjectLockConfiguration",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 409 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiPutObjectRetentionRequest struct {
+ ctx context.Context
+ ApiService *ObjectLockApiService
+ bucket string
+ key string
+ putObjectRetentionRequest *PutObjectRetentionRequest
+ versionId *string
+ xAmzBypassGovernanceRetention *bool
+ contentMD5 *string
+}
+
+func (r ApiPutObjectRetentionRequest) PutObjectRetentionRequest(putObjectRetentionRequest PutObjectRetentionRequest) ApiPutObjectRetentionRequest {
+ r.putObjectRetentionRequest = &putObjectRetentionRequest
+ return r
+}
+
+// The version ID of the object to which you want to apply the Object Retention configuration.
+func (r ApiPutObjectRetentionRequest) VersionId(versionId string) ApiPutObjectRetentionRequest {
+ r.versionId = &versionId
+ return r
+}
+
+// Indicates whether this operation should bypass Governance mode's restrictions.
+func (r ApiPutObjectRetentionRequest) XAmzBypassGovernanceRetention(xAmzBypassGovernanceRetention bool) ApiPutObjectRetentionRequest {
+ r.xAmzBypassGovernanceRetention = &xAmzBypassGovernanceRetention
+ return r
+}
+
+func (r ApiPutObjectRetentionRequest) ContentMD5(contentMD5 string) ApiPutObjectRetentionRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutObjectRetentionRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutObjectRetentionExecute(r)
+}
+
+/*
+PutObjectRetention PutObjectRetention
+
+Places an Object Retention configuration on an object.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:PutObjectRetention` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+Bypassing a Governance Retention configuration also requires the `s3:BypassGovernanceRetention` permission.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key The key name of the object to which you want to apply the Object Retention configuration.
+ @return ApiPutObjectRetentionRequest
+*/
+func (a *ObjectLockApiService) PutObjectRetention(ctx context.Context, bucket string, key string) ApiPutObjectRetentionRequest {
+ return ApiPutObjectRetentionRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+func (a *ObjectLockApiService) PutObjectRetentionExecute(r ApiPutObjectRetentionRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectLockApiService.PutObjectRetention")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?retention"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return nil, reportError("key must have at least 1 elements")
+ }
+ if r.putObjectRetentionRequest == nil {
+ return nil, reportError("putObjectRetentionRequest is required and must be specified")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xAmzBypassGovernanceRetention != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-bypass-governance-retention", r.xAmzBypassGovernanceRetention, "")
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.putObjectRetentionRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutObjectRetention",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_objects.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_objects.go
new file mode 100644
index 0000000000..34fa7e4d3c
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_objects.go
@@ -0,0 +1,2800 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "os"
+ "strings"
+ "time"
+)
+
+// ObjectsApiService ObjectsApi service
+type ObjectsApiService service
+
+type ApiCopyObjectRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ xAmzCopySource *string
+ key string
+ cacheControl *string
+ contentDisposition *string
+ contentEncoding *string
+ contentLanguage *string
+ contentType *string
+ xAmzCopySourceIfMatch *string
+ xAmzCopySourceIfModifiedSince *time.Time
+ xAmzCopySourceIfNoneMatch *string
+ xAmzCopySourceIfUnmodifiedSince *time.Time
+ expires *time.Time
+ xAmzMetadataDirective *string
+ xAmzTaggingDirective *string
+ xAmzServerSideEncryption *string
+ xAmzStorageClass *string
+ xAmzWebsiteRedirectLocation *string
+ xAmzServerSideEncryptionCustomerAlgorithm *string
+ xAmzServerSideEncryptionCustomerKey *string
+ xAmzServerSideEncryptionCustomerKeyMD5 *string
+ xAmzCopySourceServerSideEncryptionCustomerAlgorithm *string
+ xAmzCopySourceServerSideEncryptionCustomerKey *string
+ xAmzCopySourceServerSideEncryptionCustomerKeyMD5 *string
+ xAmzTagging *string
+ xAmzObjectLockMode *string
+ xAmzObjectLockRetainUntilDate *time.Time
+ xAmzObjectLockLegalHold *string
+ xAmzMeta *map[string]string
+ copyObjectRequest *CopyObjectRequest
+}
+
+// <p>Specifies the source object for the copy operation.
+func (r ApiCopyObjectRequest) XAmzCopySource(xAmzCopySource string) ApiCopyObjectRequest {
+ r.xAmzCopySource = &xAmzCopySource
+ return r
+}
+
+// Specifies caching behavior along the request/reply chain.
+func (r ApiCopyObjectRequest) CacheControl(cacheControl string) ApiCopyObjectRequest {
+ r.cacheControl = &cacheControl
+ return r
+}
+
+// Specifies presentational information for the object.
+func (r ApiCopyObjectRequest) ContentDisposition(contentDisposition string) ApiCopyObjectRequest {
+ r.contentDisposition = &contentDisposition
+ return r
+}
+
+// Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
+func (r ApiCopyObjectRequest) ContentEncoding(contentEncoding string) ApiCopyObjectRequest {
+ r.contentEncoding = &contentEncoding
+ return r
+}
+
+// The language the content is in.
+func (r ApiCopyObjectRequest) ContentLanguage(contentLanguage string) ApiCopyObjectRequest {
+ r.contentLanguage = &contentLanguage
+ return r
+}
+
+// A standard MIME type describing the format of the object data.
+func (r ApiCopyObjectRequest) ContentType(contentType string) ApiCopyObjectRequest {
+ r.contentType = &contentType
+ return r
+}
+
+// Copies the object if its entity tag (ETag) matches the specified tag.
+func (r ApiCopyObjectRequest) XAmzCopySourceIfMatch(xAmzCopySourceIfMatch string) ApiCopyObjectRequest {
+ r.xAmzCopySourceIfMatch = &xAmzCopySourceIfMatch
+ return r
+}
+
+// Copies the object if it has been modified since the specified time.
+func (r ApiCopyObjectRequest) XAmzCopySourceIfModifiedSince(xAmzCopySourceIfModifiedSince time.Time) ApiCopyObjectRequest {
+ r.xAmzCopySourceIfModifiedSince = &xAmzCopySourceIfModifiedSince
+ return r
+}
+
+// Copies the object if its entity tag (ETag) is different than the specified ETag.
+func (r ApiCopyObjectRequest) XAmzCopySourceIfNoneMatch(xAmzCopySourceIfNoneMatch string) ApiCopyObjectRequest {
+ r.xAmzCopySourceIfNoneMatch = &xAmzCopySourceIfNoneMatch
+ return r
+}
+
+// Copies the object if it hasn't been modified since the specified time.
+func (r ApiCopyObjectRequest) XAmzCopySourceIfUnmodifiedSince(xAmzCopySourceIfUnmodifiedSince time.Time) ApiCopyObjectRequest {
+ r.xAmzCopySourceIfUnmodifiedSince = &xAmzCopySourceIfUnmodifiedSince
+ return r
+}
+
+// The date and time at which the object is no longer cacheable.
+func (r ApiCopyObjectRequest) Expires(expires time.Time) ApiCopyObjectRequest {
+ r.expires = &expires
+ return r
+}
+
+// Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.
+func (r ApiCopyObjectRequest) XAmzMetadataDirective(xAmzMetadataDirective string) ApiCopyObjectRequest {
+ r.xAmzMetadataDirective = &xAmzMetadataDirective
+ return r
+}
+
+// Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.
+func (r ApiCopyObjectRequest) XAmzTaggingDirective(xAmzTaggingDirective string) ApiCopyObjectRequest {
+ r.xAmzTaggingDirective = &xAmzTaggingDirective
+ return r
+}
+
+// The server-side encryption algorithm used when storing this object in IONOS Object Storage (AES256).
+func (r ApiCopyObjectRequest) XAmzServerSideEncryption(xAmzServerSideEncryption string) ApiCopyObjectRequest {
+ r.xAmzServerSideEncryption = &xAmzServerSideEncryption
+ return r
+}
+
+// IONOS Object Storage uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability.
+func (r ApiCopyObjectRequest) XAmzStorageClass(xAmzStorageClass string) ApiCopyObjectRequest {
+ r.xAmzStorageClass = &xAmzStorageClass
+ return r
+}
+
+// If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. IONOS Object Storage stores the value of this header in the object metadata.
+func (r ApiCopyObjectRequest) XAmzWebsiteRedirectLocation(xAmzWebsiteRedirectLocation string) ApiCopyObjectRequest {
+ r.xAmzWebsiteRedirectLocation = &xAmzWebsiteRedirectLocation
+ return r
+}
+
+// Specifies the algorithm to use to when encrypting the object (AES256).
+func (r ApiCopyObjectRequest) XAmzServerSideEncryptionCustomerAlgorithm(xAmzServerSideEncryptionCustomerAlgorithm string) ApiCopyObjectRequest {
+ r.xAmzServerSideEncryptionCustomerAlgorithm = &xAmzServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+// Specifies the customer-provided encryption key for IONOS Object Storage to use in encrypting data. This value is used to store the object and then it is discarded; IONOS Object Storage does not store the encryption key. The key must be appropriate for use with the algorithm specified in the `x-amz-server-side-encryption-customer-algorithm` header.
+func (r ApiCopyObjectRequest) XAmzServerSideEncryptionCustomerKey(xAmzServerSideEncryptionCustomerKey string) ApiCopyObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKey = &xAmzServerSideEncryptionCustomerKey
+ return r
+}
+
+// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. IONOS Object Storage uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
+func (r ApiCopyObjectRequest) XAmzServerSideEncryptionCustomerKeyMD5(xAmzServerSideEncryptionCustomerKeyMD5 string) ApiCopyObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKeyMD5 = &xAmzServerSideEncryptionCustomerKeyMD5
+ return r
+}
+
+// Specifies the algorithm to use when decrypting the source object (AES256).
+func (r ApiCopyObjectRequest) XAmzCopySourceServerSideEncryptionCustomerAlgorithm(xAmzCopySourceServerSideEncryptionCustomerAlgorithm string) ApiCopyObjectRequest {
+ r.xAmzCopySourceServerSideEncryptionCustomerAlgorithm = &xAmzCopySourceServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+// Specifies the customer-provided encryption key for IONOS Object Storage to use to decrypt the source object. The encryption key provided in this header must be one that was used when the source object was created.
+func (r ApiCopyObjectRequest) XAmzCopySourceServerSideEncryptionCustomerKey(xAmzCopySourceServerSideEncryptionCustomerKey string) ApiCopyObjectRequest {
+ r.xAmzCopySourceServerSideEncryptionCustomerKey = &xAmzCopySourceServerSideEncryptionCustomerKey
+ return r
+}
+
+// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. IONOS Object Storage uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
+func (r ApiCopyObjectRequest) XAmzCopySourceServerSideEncryptionCustomerKeyMD5(xAmzCopySourceServerSideEncryptionCustomerKeyMD5 string) ApiCopyObjectRequest {
+ r.xAmzCopySourceServerSideEncryptionCustomerKeyMD5 = &xAmzCopySourceServerSideEncryptionCustomerKeyMD5
+ return r
+}
+
+// The tag-set for the object destination object this value must be used in conjunction with the `TaggingDirective`. The tag-set must be encoded as URL Query parameters.
+func (r ApiCopyObjectRequest) XAmzTagging(xAmzTagging string) ApiCopyObjectRequest {
+ r.xAmzTagging = &xAmzTagging
+ return r
+}
+
+// The Object Lock mode that you want to apply to the copied object.
+func (r ApiCopyObjectRequest) XAmzObjectLockMode(xAmzObjectLockMode string) ApiCopyObjectRequest {
+ r.xAmzObjectLockMode = &xAmzObjectLockMode
+ return r
+}
+
+// The date and time when you want the copied object's Object Lock to expire.
+func (r ApiCopyObjectRequest) XAmzObjectLockRetainUntilDate(xAmzObjectLockRetainUntilDate time.Time) ApiCopyObjectRequest {
+ r.xAmzObjectLockRetainUntilDate = &xAmzObjectLockRetainUntilDate
+ return r
+}
+
+// Specifies whether you want to apply a Legal Hold to the copied object.
+func (r ApiCopyObjectRequest) XAmzObjectLockLegalHold(xAmzObjectLockLegalHold string) ApiCopyObjectRequest {
+ r.xAmzObjectLockLegalHold = &xAmzObjectLockLegalHold
+ return r
+}
+
+// A map of metadata to store with the object in S3.
+func (r ApiCopyObjectRequest) XAmzMeta(xAmzMeta map[string]string) ApiCopyObjectRequest {
+ r.xAmzMeta = &xAmzMeta
+ return r
+}
+
+func (r ApiCopyObjectRequest) CopyObjectRequest(copyObjectRequest CopyObjectRequest) ApiCopyObjectRequest {
+ r.copyObjectRequest = ©ObjectRequest
+ return r
+}
+
+func (r ApiCopyObjectRequest) Execute() (*CopyObjectResult, *shared.APIResponse, error) {
+ return r.ApiService.CopyObjectExecute(r)
+}
+
+/*
+CopyObject CopyObject
+
+Creates a copy of an object that is already stored in IONOS Object Storage.
You can store individual objects of up to 5 TB in IONOS Object Storage. You create a copy of your object up to 5 GB in size in a single atomic operation using this API. However, to copy an object greater than 5 GB, you must use the multipart upload Upload Part - Copy API.
All copy requests must be authenticated. Additionally, you must have read access to the source object and write access to the destination bucket. Both the Region that you want to copy the object from and the Region that you want to copy the object to must be enabled for your account.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key The key of the destination object.
+ @return ApiCopyObjectRequest
+*/
+func (a *ObjectsApiService) CopyObject(ctx context.Context, bucket string, key string) ApiCopyObjectRequest {
+ return ApiCopyObjectRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return CopyObjectResult
+func (a *ObjectsApiService) CopyObjectExecute(r ApiCopyObjectRequest) (*CopyObjectResult, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *CopyObjectResult
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.CopyObject")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?x-amz-copy-source"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.xAmzCopySource == nil {
+ return localVarReturnValue, nil, reportError("xAmzCopySource is required and must be specified")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cacheControl != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Cache-Control", r.cacheControl, "")
+ }
+ if r.contentDisposition != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Disposition", r.contentDisposition, "")
+ }
+ if r.contentEncoding != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Encoding", r.contentEncoding, "")
+ }
+ if r.contentLanguage != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Language", r.contentLanguage, "")
+ }
+ if r.contentType != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Type", r.contentType, "")
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source", r.xAmzCopySource, "")
+ if r.xAmzCopySourceIfMatch != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-if-match", r.xAmzCopySourceIfMatch, "")
+ }
+ if r.xAmzCopySourceIfModifiedSince != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-if-modified-since", r.xAmzCopySourceIfModifiedSince, "")
+ }
+ if r.xAmzCopySourceIfNoneMatch != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-if-none-match", r.xAmzCopySourceIfNoneMatch, "")
+ }
+ if r.xAmzCopySourceIfUnmodifiedSince != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-if-unmodified-since", r.xAmzCopySourceIfUnmodifiedSince, "")
+ }
+ if r.expires != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Expires", r.expires, "")
+ }
+ if r.xAmzMetadataDirective != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-metadata-directive", r.xAmzMetadataDirective, "")
+ }
+ if r.xAmzTaggingDirective != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-tagging-directive", r.xAmzTaggingDirective, "")
+ }
+ if r.xAmzServerSideEncryption != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption", r.xAmzServerSideEncryption, "")
+ }
+ if r.xAmzStorageClass != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-storage-class", r.xAmzStorageClass, "")
+ }
+ if r.xAmzWebsiteRedirectLocation != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-website-redirect-location", r.xAmzWebsiteRedirectLocation, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-algorithm", r.xAmzServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKey != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key", r.xAmzServerSideEncryptionCustomerKey, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKeyMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key-MD5", r.xAmzServerSideEncryptionCustomerKeyMD5, "")
+ }
+ if r.xAmzCopySourceServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-server-side-encryption-customer-algorithm", r.xAmzCopySourceServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.xAmzCopySourceServerSideEncryptionCustomerKey != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-server-side-encryption-customer-key", r.xAmzCopySourceServerSideEncryptionCustomerKey, "")
+ }
+ if r.xAmzCopySourceServerSideEncryptionCustomerKeyMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-server-side-encryption-customer-key-MD5", r.xAmzCopySourceServerSideEncryptionCustomerKeyMD5, "")
+ }
+ if r.xAmzTagging != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-tagging", r.xAmzTagging, "")
+ }
+ if r.xAmzObjectLockMode != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-mode", r.xAmzObjectLockMode, "")
+ }
+ if r.xAmzObjectLockRetainUntilDate != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-retain-until-date", r.xAmzObjectLockRetainUntilDate, "")
+ }
+ if r.xAmzObjectLockLegalHold != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-legal-hold", r.xAmzObjectLockLegalHold, "")
+ }
+ if r.xAmzMeta != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-meta", r.xAmzMeta, "")
+ }
+ // body params
+ localVarPostBody = r.copyObjectRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "CopyObject",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiDeleteObjectRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ key string
+ xAmzMfa *string
+ versionId *string
+ xAmzBypassGovernanceRetention *bool
+}
+
+// The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA Delete enabled.
+func (r ApiDeleteObjectRequest) XAmzMfa(xAmzMfa string) ApiDeleteObjectRequest {
+ r.xAmzMfa = &xAmzMfa
+ return r
+}
+
+// VersionId used to reference a specific version of the object.
+func (r ApiDeleteObjectRequest) VersionId(versionId string) ApiDeleteObjectRequest {
+ r.versionId = &versionId
+ return r
+}
+
+// Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the `PutBucketPublicAccessBlock` permission.
+func (r ApiDeleteObjectRequest) XAmzBypassGovernanceRetention(xAmzBypassGovernanceRetention bool) ApiDeleteObjectRequest {
+ r.xAmzBypassGovernanceRetention = &xAmzBypassGovernanceRetention
+ return r
+}
+
+func (r ApiDeleteObjectRequest) Execute() (map[string]interface{}, *shared.APIResponse, error) {
+ return r.ApiService.DeleteObjectExecute(r)
+}
+
+/*
+DeleteObject DeleteObject
+
+ Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. This operation is final - there is no way to recover a deleted object. Data stored in IONOS Object Storage is erasure coded and distributed to multiple individual storage devices in multiple data centers. When data is deleted, various mechanisms exist which prevent recovery or reconstruction of the deleted objects.
Deletion of an object undergoes various stages. First, the metadata is marked to indicate the object is deleted, then, the data is removed. Eventually, deleted metadata is overwritten and the deleted data blocks are overwritten with new data in the course of normal operations. As soon as the metadata is marked deleted, it is not possible to read an object remotely.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Key name of the object to delete.
+ @return ApiDeleteObjectRequest
+*/
+func (a *ObjectsApiService) DeleteObject(ctx context.Context, bucket string, key string) ApiDeleteObjectRequest {
+ return ApiDeleteObjectRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return map[string]interface{}
+func (a *ObjectsApiService) DeleteObjectExecute(r ApiDeleteObjectRequest) (map[string]interface{}, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue map[string]interface{}
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.DeleteObject")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xAmzMfa != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-mfa", r.xAmzMfa, "")
+ }
+ if r.xAmzBypassGovernanceRetention != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-bypass-governance-retention", r.xAmzBypassGovernanceRetention, "")
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteObject",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiDeleteObjectsRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ deleteObjectsRequest *DeleteObjectsRequest
+ xAmzMfa *string
+ xAmzBypassGovernanceRetention *bool
+}
+
+func (r ApiDeleteObjectsRequest) DeleteObjectsRequest(deleteObjectsRequest DeleteObjectsRequest) ApiDeleteObjectsRequest {
+ r.deleteObjectsRequest = &deleteObjectsRequest
+ return r
+}
+
+// The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device. Required to permanently delete a versioned object if versioning is configured with MFA Delete enabled.
+func (r ApiDeleteObjectsRequest) XAmzMfa(xAmzMfa string) ApiDeleteObjectsRequest {
+ r.xAmzMfa = &xAmzMfa
+ return r
+}
+
+// Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. To use this header, you must have the `PutBucketPublicAccessBlock` permission.
+func (r ApiDeleteObjectsRequest) XAmzBypassGovernanceRetention(xAmzBypassGovernanceRetention bool) ApiDeleteObjectsRequest {
+ r.xAmzBypassGovernanceRetention = &xAmzBypassGovernanceRetention
+ return r
+}
+
+func (r ApiDeleteObjectsRequest) Execute() (*DeleteObjectsOutput, *shared.APIResponse, error) {
+ return r.ApiService.DeleteObjectsExecute(r)
+}
+
+/*
+DeleteObjects DeleteObjects
+
+This operation enables you to delete multiple objects from a bucket using a single HTTP request. If you know the object keys that you want to delete, then this operation provides a suitable alternative to sending individual delete requests, reducing per-request overhead.
The request contains a list of up to 1000 keys that you want to delete. In the XML, you provide the object key names, and optionally, version IDs if you want to delete a specific version of the object from a versioning-enabled bucket. For each key, IONOS Object Storage performs a delete operation and returns the result of that delete, success, or failure, in the response. Note that if the object specified in the request is not found, IONOS Object Storage returns the result as deleted.
The operation supports two modes for the response: verbose and quiet. By default, the operation uses verbose mode in which the response includes the result of deletion of each key in your request. In quiet mode the response includes only keys where the delete operation encountered an error. For a successful deletion, the operation does not return any information about the delete in the response body.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeleteObjectsRequest
+*/
+func (a *ObjectsApiService) DeleteObjects(ctx context.Context, bucket string) ApiDeleteObjectsRequest {
+ return ApiDeleteObjectsRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return DeleteObjectsOutput
+func (a *ObjectsApiService) DeleteObjectsExecute(r ApiDeleteObjectsRequest) (*DeleteObjectsOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *DeleteObjectsOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.DeleteObjects")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?delete"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.deleteObjectsRequest == nil {
+ return localVarReturnValue, nil, reportError("deleteObjectsRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xAmzMfa != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-mfa", r.xAmzMfa, "")
+ }
+ if r.xAmzBypassGovernanceRetention != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-bypass-governance-retention", r.xAmzBypassGovernanceRetention, "")
+ }
+ // body params
+ localVarPostBody = r.deleteObjectsRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteObjects",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiGetObjectRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ key string
+ ifMatch *string
+ ifModifiedSince *time.Time
+ ifNoneMatch *string
+ ifUnmodifiedSince *time.Time
+ range_ *string
+ responseCacheControl *string
+ responseContentDisposition *string
+ responseContentEncoding *string
+ responseContentLanguage *string
+ responseContentType *string
+ responseExpires *time.Time
+ versionId *string
+ xAmzServerSideEncryptionCustomerAlgorithm *string
+ xAmzServerSideEncryptionCustomerKey *string
+ xAmzServerSideEncryptionCustomerKeyMD5 *string
+ partNumber *int32
+}
+
+// Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
+func (r ApiGetObjectRequest) IfMatch(ifMatch string) ApiGetObjectRequest {
+ r.ifMatch = &ifMatch
+ return r
+}
+
+// Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
+func (r ApiGetObjectRequest) IfModifiedSince(ifModifiedSince time.Time) ApiGetObjectRequest {
+ r.ifModifiedSince = &ifModifiedSince
+ return r
+}
+
+// Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
+func (r ApiGetObjectRequest) IfNoneMatch(ifNoneMatch string) ApiGetObjectRequest {
+ r.ifNoneMatch = &ifNoneMatch
+ return r
+}
+
+// Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
+func (r ApiGetObjectRequest) IfUnmodifiedSince(ifUnmodifiedSince time.Time) ApiGetObjectRequest {
+ r.ifUnmodifiedSince = &ifUnmodifiedSince
+ return r
+}
+
+// <p>Downloads the specified range bytes of an object. For more information about the HTTP Range header, see <a href=\"https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35\">Range</a>.</p> <note> <p>IONOS Object Storage doesn't support retrieving multiple ranges of data per `GET` request.</p> </note>
+func (r ApiGetObjectRequest) Range_(range_ string) ApiGetObjectRequest {
+ r.range_ = &range_
+ return r
+}
+
+// Sets the `Cache-Control` header of the response.
+func (r ApiGetObjectRequest) ResponseCacheControl(responseCacheControl string) ApiGetObjectRequest {
+ r.responseCacheControl = &responseCacheControl
+ return r
+}
+
+// Sets the `Content-Disposition` header of the response
+func (r ApiGetObjectRequest) ResponseContentDisposition(responseContentDisposition string) ApiGetObjectRequest {
+ r.responseContentDisposition = &responseContentDisposition
+ return r
+}
+
+// Sets the `Content-Encoding` header of the response.
+func (r ApiGetObjectRequest) ResponseContentEncoding(responseContentEncoding string) ApiGetObjectRequest {
+ r.responseContentEncoding = &responseContentEncoding
+ return r
+}
+
+// Sets the `Content-Language` header of the response.
+func (r ApiGetObjectRequest) ResponseContentLanguage(responseContentLanguage string) ApiGetObjectRequest {
+ r.responseContentLanguage = &responseContentLanguage
+ return r
+}
+
+// Sets the `Content-Type` header of the response.
+func (r ApiGetObjectRequest) ResponseContentType(responseContentType string) ApiGetObjectRequest {
+ r.responseContentType = &responseContentType
+ return r
+}
+
+// Sets the `Expires` header of the response.
+func (r ApiGetObjectRequest) ResponseExpires(responseExpires time.Time) ApiGetObjectRequest {
+ r.responseExpires = &responseExpires
+ return r
+}
+
+// VersionId used to reference a specific version of the object.
+func (r ApiGetObjectRequest) VersionId(versionId string) ApiGetObjectRequest {
+ r.versionId = &versionId
+ return r
+}
+
+// Specifies the algorithm to use to when decrypting the object (AES256).
+func (r ApiGetObjectRequest) XAmzServerSideEncryptionCustomerAlgorithm(xAmzServerSideEncryptionCustomerAlgorithm string) ApiGetObjectRequest {
+ r.xAmzServerSideEncryptionCustomerAlgorithm = &xAmzServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+// Specifies the customer-provided encryption key for IONOS Object Storage used to encrypt the data. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the `x-amz-server-side-encryption-customer-algorithm` header.
+func (r ApiGetObjectRequest) XAmzServerSideEncryptionCustomerKey(xAmzServerSideEncryptionCustomerKey string) ApiGetObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKey = &xAmzServerSideEncryptionCustomerKey
+ return r
+}
+
+// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. IONOS Object Storage uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
+func (r ApiGetObjectRequest) XAmzServerSideEncryptionCustomerKeyMD5(xAmzServerSideEncryptionCustomerKeyMD5 string) ApiGetObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKeyMD5 = &xAmzServerSideEncryptionCustomerKeyMD5
+ return r
+}
+
+// Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object.
+func (r ApiGetObjectRequest) PartNumber(partNumber int32) ApiGetObjectRequest {
+ r.partNumber = &partNumber
+ return r
+}
+
+func (r ApiGetObjectRequest) Execute() (*os.File, *shared.APIResponse, error) {
+ return r.ApiService.GetObjectExecute(r)
+}
+
+/*
+GetObject GetObject
+
+Retrieves objects from IONOS Object Storage.
+An IONOS Object Storage bucket has no directory hierarchy such as you would find in a typical computer
+file system. You can, however, create a logical hierarchy by using object key names that imply a folder structure.
+For example, instead of naming an object `test.jpg`, you can name it `photos/2022/July/test.jpg`.
+
+To get an object from such a logical hierarchy, specify the full key name for the object
+in the `GET` operation:
+- For a virtual hosted-style request example, if you have the object
+`photos/2022/July/test.jpg`, specify the resource as
+`/photos/2022/July/test.jpg`.
+- For a path-style request example, if you have the object `photos/2022/July/test.jpg` in the bucket named
+`my-bucket`, specify the resource as `/my-bucket/photos/2022/July/test.jpg`.
+
+This operation returns an `InvalidObjectStateError` error.
+
+If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C)
+when you store the object in IONOS Object Storage, then when you GET the object,
+you must use the following headers:
+- x-amz-server-side-encryption-customer-algorithm
+- x-amz-server-side-encryption-customer-key
+- x-amz-server-side-encryption-customer-key-md5
+
+### Permissions
+You must be the contract owner or an administrator to perform this operation.
+If not, they can grant you permission to perform the `s3:ListBucket`
+operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+If the object you request does not exist, the error IONOS Object Storage returns depends
+on whether you also have the `ListBucket` permission:
+- If you have the `ListBucket` permission on the bucket, IONOS Object Storage will
+return an HTTP status code `404`.
+- If you don’t have the `ListBucket` permission, IONOS Object Storage
+will return an HTTP status code `403` ("Access denied") error.
+
+### Versioning
+By default, the GET operation returns the current version of an object. To return a different version,
+use the `versionId` subresource.
+- You need the `GetObjectVersion` permission to access a
+specific version of an object.
+- If the current version of the object is a delete marker, IONOS Object Storage behaves
+as if the object was deleted and includes `x-amz-delete-marker: true` in the
+response.
+
+### Overriding Response Header Values
+
+There are times when you want to override certain response header values in a `GET`
+response. For example, you might override the `Content-Disposition`
+response header value in your `GET` request.
+
+You can override values for a set of response headers using the following query
+parameters. These response header values are sent only on a successful
+request, that is, when status code `200 OK` is returned. The set of
+headers you can override using these parameters is a subset of the
+headers that IONOS Object Storage accepts when you create an object.
+
+The response headers that you can override for the GET response are the following:
+- `Content-Type`
+- `Content-Language`
+- `Expires`
+- `Cache-Control`,
+- `Content-Disposition`
+- `Content-Encoding`.
+
+To override these header values in the `GET` response, you use the following request parameters:
+- `partNumber`
+- `versionId`
+- `response-content-type`
+- `response-content-language`
+- `response-expires`
+- `response-cache-control`
+- `response-content-disposition`
+- `response-content-encoding`
+
+You must sign the request, either using an Authorization header or a presigned URL, when using these
+parameters. They cannot be used with an unsigned (anonymous) request.
+
+### Additional Considerations about Request Headers
+
+- If a Etag value sent in the `If-Match` header doesn't match the object's ETag, then the `Precondition Failed` error is returned.
+
+- If both of the `If-Match` and `If-Unmodified-Since` headers are present in the request as follows: `If-Match`
+condition evaluates to `true`, and; `If-Unmodified-Since` condition evaluates to `false`; then,
+S3 returns 200 OK and the data requested.
+
+- If both of the `If-None-Match` and `If-Modified-Since` headers are present in the request as
+follows:` If-None-Match` condition evaluates to `false`, and; `If-Modified-Since` condition
+evaluates to `true`; then, S3 returns `304 Not Modified` response code.
+
+For more information about conditional requests, see [RFC 7232](https://tools.ietf.org/html/rfc7232).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Key of the object to get.
Possible values: length ≥ 1
+ @return ApiGetObjectRequest
+*/
+func (a *ObjectsApiService) GetObject(ctx context.Context, bucket string, key string) ApiGetObjectRequest {
+ return ApiGetObjectRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return *os.File
+func (a *ObjectsApiService) GetObjectExecute(r ApiGetObjectRequest) (*os.File, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *os.File
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.GetObject")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+
+ if r.responseCacheControl != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "response-cache-control", r.responseCacheControl, "")
+ }
+ if r.responseContentDisposition != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "response-content-disposition", r.responseContentDisposition, "")
+ }
+ if r.responseContentEncoding != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "response-content-encoding", r.responseContentEncoding, "")
+ }
+ if r.responseContentLanguage != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "response-content-language", r.responseContentLanguage, "")
+ }
+ if r.responseContentType != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "response-content-type", r.responseContentType, "")
+ }
+ if r.responseExpires != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "response-expires", r.responseExpires, "")
+ }
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ if r.partNumber != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "partNumber", r.partNumber, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ifMatch != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "")
+ }
+ if r.ifModifiedSince != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Modified-Since", r.ifModifiedSince, "")
+ }
+ if r.ifNoneMatch != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "")
+ }
+ if r.ifUnmodifiedSince != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Unmodified-Since", r.ifUnmodifiedSince, "")
+ }
+ if r.range_ != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Range", r.range_, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-algorithm", r.xAmzServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKey != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key", r.xAmzServerSideEncryptionCustomerKey, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKeyMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key-MD5", r.xAmzServerSideEncryptionCustomerKeyMD5, "")
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetObject",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 412 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 481 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiHeadObjectRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ key string
+ ifMatch *string
+ ifModifiedSince *time.Time
+ ifNoneMatch *string
+ ifUnmodifiedSince *time.Time
+ range_ *string
+ versionId *string
+ xAmzServerSideEncryptionCustomerAlgorithm *string
+ xAmzServerSideEncryptionCustomerKey *string
+ xAmzServerSideEncryptionCustomerKeyMD5 *string
+ partNumber *int32
+}
+
+// Return the object only if its entity tag (ETag) is the same as the one specified, otherwise return a 412 (precondition failed).
+func (r ApiHeadObjectRequest) IfMatch(ifMatch string) ApiHeadObjectRequest {
+ r.ifMatch = &ifMatch
+ return r
+}
+
+// Return the object only if it has been modified since the specified time, otherwise return a 304 (not modified).
+func (r ApiHeadObjectRequest) IfModifiedSince(ifModifiedSince time.Time) ApiHeadObjectRequest {
+ r.ifModifiedSince = &ifModifiedSince
+ return r
+}
+
+// Return the object only if its entity tag (ETag) is different from the one specified, otherwise return a 304 (not modified).
+func (r ApiHeadObjectRequest) IfNoneMatch(ifNoneMatch string) ApiHeadObjectRequest {
+ r.ifNoneMatch = &ifNoneMatch
+ return r
+}
+
+// Return the object only if it has not been modified since the specified time, otherwise return a 412 (precondition failed).
+func (r ApiHeadObjectRequest) IfUnmodifiedSince(ifUnmodifiedSince time.Time) ApiHeadObjectRequest {
+ r.ifUnmodifiedSince = &ifUnmodifiedSince
+ return r
+}
+
+// <p>Downloads the specified range bytes of an object. For more information about the HTTP Range header, see <a href=\"https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35\">Range</a>.</p> <note> <p>IONOS Object Storage doesn't support retrieving multiple ranges of data per `GET` request.</p> </note>
+func (r ApiHeadObjectRequest) Range_(range_ string) ApiHeadObjectRequest {
+ r.range_ = &range_
+ return r
+}
+
+// VersionId used to reference a specific version of the object.
+func (r ApiHeadObjectRequest) VersionId(versionId string) ApiHeadObjectRequest {
+ r.versionId = &versionId
+ return r
+}
+
+// Specifies the algorithm to use to when encrypting the object (AES256).
+func (r ApiHeadObjectRequest) XAmzServerSideEncryptionCustomerAlgorithm(xAmzServerSideEncryptionCustomerAlgorithm string) ApiHeadObjectRequest {
+ r.xAmzServerSideEncryptionCustomerAlgorithm = &xAmzServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+// Specifies the customer-provided encryption key for IONOS Object Storage to use in encrypting data. This value is used to store the object and then it is discarded; IONOS Object Storage does not store the encryption key. The key must be appropriate for use with the algorithm specified in the `x-amz-server-side-encryption-customer-algorithm` header.
+func (r ApiHeadObjectRequest) XAmzServerSideEncryptionCustomerKey(xAmzServerSideEncryptionCustomerKey string) ApiHeadObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKey = &xAmzServerSideEncryptionCustomerKey
+ return r
+}
+
+// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. IONOS Object Storage uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
+func (r ApiHeadObjectRequest) XAmzServerSideEncryptionCustomerKeyMD5(xAmzServerSideEncryptionCustomerKeyMD5 string) ApiHeadObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKeyMD5 = &xAmzServerSideEncryptionCustomerKeyMD5
+ return r
+}
+
+// Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object.
+func (r ApiHeadObjectRequest) PartNumber(partNumber int32) ApiHeadObjectRequest {
+ r.partNumber = &partNumber
+ return r
+}
+
+func (r ApiHeadObjectRequest) Execute() (*HeadObjectOutput, *shared.APIResponse, error) {
+ return r.ApiService.HeadObjectExecute(r)
+}
+
+/*
+HeadObject HeadObject
+
+The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.
A `HEAD` request has the same options as a `GET` operation on an object. The response is identical to the `GET` response except that there is no response body. Because of this, if the `HEAD` request generates an error, it returns a generic `404 Not Found` or `403 Forbidden` code. It is not possible to retrieve the exact exception beyond these error codes.
If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in IONOS Object Storage, then when you retrieve the metadata from the object, you must use the following headers:
-
`x-amz-server-side-encryption-customer-algorithm` = `AES256`
-
`x-amz-server-side-encryption-customer-key`
-
`x-amz-server-side-encryption-customer-key-MD5`
-
Encryption request headers, like `x-amz-server-side-encryption`, should not be sent for GET requests if your object uses the server-side encryption with IONOS Object Storage–managed encryption keys (SSE-S3). If your object does use this type of keys, you’ll get an HTTP 400 BadRequest error.
-
The last modified property in this case is the creation date of the object.
Request headers are limited to 8 KB in size.
Consider the following when using request headers:
-
Consideration 1 – If both of the `If-Match` and `If-Unmodified-Since` headers are present in the request as follows:
Then IONOS Object Storage returns `200 OK` and the data requested.
-
Consideration 2 – If both of the `If-None-Match` and `If-Modified-Since` headers are present in the request as follows:
-
`If-None-Match` condition evaluates to `false`, and;
-
`If-Modified-Since` condition evaluates to `true`;
Then IONOS Object Storage returns the `304 Not Modified` response code.
For more information about conditional requests, see RFC 7232.
Permissions
You need the relevant read object (or version) permission for this operation. If the object you request does not exist, the error IONOS Object Storage returns depends on whether you also have the ListBucket permission.
-
If you have the `ListBucket` permission on the bucket, IONOS Object Storage returns an HTTP status code 404 ("no such key") error.
-
If you don’t have the `ListBucket` permission, IONOS Object Storage returns an HTTP status code 403 ("access denied") error.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key The object key.
+ @return ApiHeadObjectRequest
+*/
+func (a *ObjectsApiService) HeadObject(ctx context.Context, bucket string, key string) ApiHeadObjectRequest {
+ return ApiHeadObjectRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return HeadObjectOutput
+func (a *ObjectsApiService) HeadObjectExecute(r ApiHeadObjectRequest) (*HeadObjectOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodHead
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *HeadObjectOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.HeadObject")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ if r.partNumber != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "partNumber", r.partNumber, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ifMatch != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "")
+ }
+ if r.ifModifiedSince != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Modified-Since", r.ifModifiedSince, "")
+ }
+ if r.ifNoneMatch != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "")
+ }
+ if r.ifUnmodifiedSince != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Unmodified-Since", r.ifUnmodifiedSince, "")
+ }
+ if r.range_ != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Range", r.range_, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-algorithm", r.xAmzServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKey != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key", r.xAmzServerSideEncryptionCustomerKey, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKeyMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key-MD5", r.xAmzServerSideEncryptionCustomerKeyMD5, "")
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "HeadObject",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 480 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiListObjectsRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ delimiter *string
+ encodingType *string
+ marker *string
+ maxKeys *int32
+ prefix *string
+ xAmzRequestPayer *string
+ maxKeys2 *string
+ marker2 *string
+}
+
+// A delimiter is a character you use to group keys.
+func (r ApiListObjectsRequest) Delimiter(delimiter string) ApiListObjectsRequest {
+ r.delimiter = &delimiter
+ return r
+}
+
+func (r ApiListObjectsRequest) EncodingType(encodingType string) ApiListObjectsRequest {
+ r.encodingType = &encodingType
+ return r
+}
+
+// Marker is where you want IONOS Object Storage to start listing from. IONOS Object Storage starts listing after this specified key. Marker can be any key in the bucket.
+func (r ApiListObjectsRequest) Marker(marker string) ApiListObjectsRequest {
+ r.marker = &marker
+ return r
+}
+
+// Sets the maximum number of keys returned in the response. By default the operation returns up to 1,000 key names. The response might contain fewer keys but will never contain more.
+func (r ApiListObjectsRequest) MaxKeys(maxKeys int32) ApiListObjectsRequest {
+ r.maxKeys = &maxKeys
+ return r
+}
+
+// Limits the response to keys that begin with the specified prefix.
+func (r ApiListObjectsRequest) Prefix(prefix string) ApiListObjectsRequest {
+ r.prefix = &prefix
+ return r
+}
+
+// Confirms that the requester knows that she or he will be charged for the list objects request. Bucket owners need not specify this parameter in their requests.
+func (r ApiListObjectsRequest) XAmzRequestPayer(xAmzRequestPayer string) ApiListObjectsRequest {
+ r.xAmzRequestPayer = &xAmzRequestPayer
+ return r
+}
+
+// Pagination limit
+func (r ApiListObjectsRequest) MaxKeys2(maxKeys2 string) ApiListObjectsRequest {
+ r.maxKeys2 = &maxKeys2
+ return r
+}
+
+// Pagination token
+func (r ApiListObjectsRequest) Marker2(marker2 string) ApiListObjectsRequest {
+ r.marker2 = &marker2
+ return r
+}
+
+func (r ApiListObjectsRequest) Execute() (*ListObjectsOutput, *shared.APIResponse, error) {
+ return r.ApiService.ListObjectsExecute(r)
+}
+
+/*
+ListObjects ListObjects
+
+Returns some or all (up to 1,000) of the objects in a bucket. You can
+use the request parameters as selection criteria to return a subset of
+the objects in a bucket. A 200 OK response can contain valid or invalid
+XML. Be sure to design your application to parse the contents of the
+response and handle it appropriately.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:ListBucket` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiListObjectsRequest
+*/
+func (a *ObjectsApiService) ListObjects(ctx context.Context, bucket string) ApiListObjectsRequest {
+ return ApiListObjectsRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return ListObjectsOutput
+func (a *ObjectsApiService) ListObjectsExecute(r ApiListObjectsRequest) (*ListObjectsOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ListObjectsOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.ListObjects")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ if r.delimiter != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "delimiter", r.delimiter, "")
+ }
+ if r.encodingType != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "encoding-type", r.encodingType, "")
+ }
+ if r.marker != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "marker", r.marker, "")
+ }
+ if r.maxKeys != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "max-keys", r.maxKeys, "")
+ }
+ if r.prefix != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", r.prefix, "")
+ }
+ if r.maxKeys2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "MaxKeys", r.maxKeys2, "")
+ }
+ if r.marker2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "Marker", r.marker2, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.xAmzRequestPayer != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-request-payer", r.xAmzRequestPayer, "")
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "ListObjects",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiListObjectsV2Request struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ delimiter *string
+ encodingType *string
+ maxKeys *int32
+ prefix *string
+ continuationToken *string
+ fetchOwner *bool
+ startAfter *string
+}
+
+// A delimiter is a character you use to group keys.
+func (r ApiListObjectsV2Request) Delimiter(delimiter string) ApiListObjectsV2Request {
+ r.delimiter = &delimiter
+ return r
+}
+
+// Encoding type used by IONOS Object Storage to encode object keys in the response.
+func (r ApiListObjectsV2Request) EncodingType(encodingType string) ApiListObjectsV2Request {
+ r.encodingType = &encodingType
+ return r
+}
+
+// Sets the maximum number of keys returned in the response. By default the operation returns up to 1000 key names. The response might contain fewer keys but will never contain more.
+func (r ApiListObjectsV2Request) MaxKeys(maxKeys int32) ApiListObjectsV2Request {
+ r.maxKeys = &maxKeys
+ return r
+}
+
+// Limits the response to keys that begin with the specified prefix.
+func (r ApiListObjectsV2Request) Prefix(prefix string) ApiListObjectsV2Request {
+ r.prefix = &prefix
+ return r
+}
+
+// ContinuationToken indicates IONOS Object Storage that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key.
+func (r ApiListObjectsV2Request) ContinuationToken(continuationToken string) ApiListObjectsV2Request {
+ r.continuationToken = &continuationToken
+ return r
+}
+
+// The owner field is not present in listV2 by default, if you want to return owner field with each key in the result then set the fetch owner field to true.
+func (r ApiListObjectsV2Request) FetchOwner(fetchOwner bool) ApiListObjectsV2Request {
+ r.fetchOwner = &fetchOwner
+ return r
+}
+
+// StartAfter is where you want to start listing from. IONOS Object Storage starts listing after this specified key. StartAfter can be any key in the bucket.
+func (r ApiListObjectsV2Request) StartAfter(startAfter string) ApiListObjectsV2Request {
+ r.startAfter = &startAfter
+ return r
+}
+
+func (r ApiListObjectsV2Request) Execute() (*ListBucketResultV2, *shared.APIResponse, error) {
+ return r.ApiService.ListObjectsV2Execute(r)
+}
+
+/*
+ListObjectsV2 ListObjectsV2
+
+Retrieves a partial or complete list (with a maximum of 1000 objects per request) from a specified bucket.
+The request parameters can serve as selection criteria to filter and return a subset of objects from the bucket.
+
+A `200 OK` response can contain either valid or invalid XML, so it's crucial to construct your application
+in such a way that it can correctly parse and handle the response content. In the resulting list, objects
+are organized in ascending order according to their key names.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:ListBucket` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiListObjectsV2Request
+*/
+func (a *ObjectsApiService) ListObjectsV2(ctx context.Context, bucket string) ApiListObjectsV2Request {
+ return ApiListObjectsV2Request{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return ListBucketResultV2
+func (a *ObjectsApiService) ListObjectsV2Execute(r ApiListObjectsV2Request) (*ListBucketResultV2, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ListBucketResultV2
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.ListObjectsV2")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?list-type=2"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ if r.delimiter != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "delimiter", r.delimiter, "")
+ }
+ if r.encodingType != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "encoding-type", r.encodingType, "")
+ }
+ if r.maxKeys != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "max-keys", r.maxKeys, "")
+ } else {
+ var defaultValue int32 = 1000
+ r.maxKeys = &defaultValue
+ }
+ if r.prefix != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", r.prefix, "")
+ }
+ if r.continuationToken != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "continuation-token", r.continuationToken, "")
+ }
+ if r.fetchOwner != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "fetch-owner", r.fetchOwner, "")
+ } else {
+ var defaultValue bool = false
+ r.fetchOwner = &defaultValue
+ }
+ if r.startAfter != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "start-after", r.startAfter, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "ListObjectsV2",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiOPTIONSObjectRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ origin *string
+ accessControlRequestMethod *string
+ accessControlRequestHeaders *string
+}
+
+// <p>Identifies the origin of the cross-origin request to the IONOS Object Storage. </p>
+func (r ApiOPTIONSObjectRequest) Origin(origin string) ApiOPTIONSObjectRequest {
+ r.origin = &origin
+ return r
+}
+
+// Identifies what HTTP method will be used in the actual request.
+func (r ApiOPTIONSObjectRequest) AccessControlRequestMethod(accessControlRequestMethod string) ApiOPTIONSObjectRequest {
+ r.accessControlRequestMethod = &accessControlRequestMethod
+ return r
+}
+
+// <p> A comma-delimited list of HTTP headers that will be sent in the actual request. </p> <p> For example, to put an object with server-side encryption, this preflight request will determine if it can include the `x-amz-server-side-encryption` header with the request. </p>
+func (r ApiOPTIONSObjectRequest) AccessControlRequestHeaders(accessControlRequestHeaders string) ApiOPTIONSObjectRequest {
+ r.accessControlRequestHeaders = &accessControlRequestHeaders
+ return r
+}
+
+func (r ApiOPTIONSObjectRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.OPTIONSObjectExecute(r)
+}
+
+/*
+OPTIONSObject OPTIONSObject
+
+This API is used to issue a preflight request to the IONOS Object Storage to determine if it can send an actual request with the specific origin, HTTP method, and headers.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiOPTIONSObjectRequest
+*/
+func (a *ObjectsApiService) OPTIONSObject(ctx context.Context, bucket string) ApiOPTIONSObjectRequest {
+ return ApiOPTIONSObjectRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *ObjectsApiService) OPTIONSObjectExecute(r ApiOPTIONSObjectRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodOptions
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.OPTIONSObject")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.origin == nil {
+ return nil, reportError("origin is required and must be specified")
+ }
+ if r.accessControlRequestMethod == nil {
+ return nil, reportError("accessControlRequestMethod is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Origin", r.origin, "")
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Access-Control-Request-Method", r.accessControlRequestMethod, "")
+ if r.accessControlRequestHeaders != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Access-Control-Request-Headers", r.accessControlRequestHeaders, "")
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "OPTIONSObject",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiPOSTObjectRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ key string
+ pOSTObjectRequest *POSTObjectRequest
+ cacheControl *string
+ contentDisposition *string
+ contentEncoding *string
+ contentLanguage *string
+ contentLength *int32
+ contentMD5 *string
+ contentType *string
+ expires *time.Time
+ xAmzServerSideEncryption *string
+ xAmzStorageClass *string
+ xAmzWebsiteRedirectLocation *string
+ xAmzServerSideEncryptionCustomerAlgorithm *string
+ xAmzServerSideEncryptionCustomerKey *string
+ xAmzServerSideEncryptionCustomerKeyMD5 *string
+ xAmzServerSideEncryptionContext *string
+ xAmzServerSideEncryptionBucketKeyEnabled *bool
+ xAmzRequestPayer *string
+ xAmzTagging *string
+ xAmzObjectLockMode *string
+ xAmzObjectLockRetainUntilDate *time.Time
+ xAmzObjectLockLegalHold *string
+}
+
+func (r ApiPOSTObjectRequest) POSTObjectRequest(pOSTObjectRequest POSTObjectRequest) ApiPOSTObjectRequest {
+ r.pOSTObjectRequest = &pOSTObjectRequest
+ return r
+}
+
+// Can be used to specify caching behavior along the request/reply chain. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9\">Cache-Control</a>.
+func (r ApiPOSTObjectRequest) CacheControl(cacheControl string) ApiPOSTObjectRequest {
+ r.cacheControl = &cacheControl
+ return r
+}
+
+// Specifies presentational information for the object. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1\">Content-Disposition</a>.
+func (r ApiPOSTObjectRequest) ContentDisposition(contentDisposition string) ApiPOSTObjectRequest {
+ r.contentDisposition = &contentDisposition
+ return r
+}
+
+// Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11\">Content-Encoding</a>.
+func (r ApiPOSTObjectRequest) ContentEncoding(contentEncoding string) ApiPOSTObjectRequest {
+ r.contentEncoding = &contentEncoding
+ return r
+}
+
+// The language the content is in.
+func (r ApiPOSTObjectRequest) ContentLanguage(contentLanguage string) ApiPOSTObjectRequest {
+ r.contentLanguage = &contentLanguage
+ return r
+}
+
+// Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13\">Content-Length</a>.
+func (r ApiPOSTObjectRequest) ContentLength(contentLength int32) ApiPOSTObjectRequest {
+ r.contentLength = &contentLength
+ return r
+}
+
+func (r ApiPOSTObjectRequest) ContentMD5(contentMD5 string) ApiPOSTObjectRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+// A standard MIME type describing the format of the contents. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17\">Content-Type</a>.
+func (r ApiPOSTObjectRequest) ContentType(contentType string) ApiPOSTObjectRequest {
+ r.contentType = &contentType
+ return r
+}
+
+// The date and time at which the object is no longer cacheable. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21\">Expires</a>.
+func (r ApiPOSTObjectRequest) Expires(expires time.Time) ApiPOSTObjectRequest {
+ r.expires = &expires
+ return r
+}
+
+// The server-side encryption algorithm used when storing this object in IONOS Object Storage (AES256).
+func (r ApiPOSTObjectRequest) XAmzServerSideEncryption(xAmzServerSideEncryption string) ApiPOSTObjectRequest {
+ r.xAmzServerSideEncryption = &xAmzServerSideEncryption
+ return r
+}
+
+// IONOS Object Storage uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability.
+func (r ApiPOSTObjectRequest) XAmzStorageClass(xAmzStorageClass string) ApiPOSTObjectRequest {
+ r.xAmzStorageClass = &xAmzStorageClass
+ return r
+}
+
+// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. IONOS Object Storage stores the value of this header in the object metadata.</p> <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p> <p> `x-amz-website-redirect-location: /anotherPage.html` </p> <p>In the following example, the request header sets the object redirect to another website:</p> <p> `x-amz-website-redirect-location: http://www.example.com/` </p>
+func (r ApiPOSTObjectRequest) XAmzWebsiteRedirectLocation(xAmzWebsiteRedirectLocation string) ApiPOSTObjectRequest {
+ r.xAmzWebsiteRedirectLocation = &xAmzWebsiteRedirectLocation
+ return r
+}
+
+// Specifies the algorithm to use to when encrypting the object (AES256).
+func (r ApiPOSTObjectRequest) XAmzServerSideEncryptionCustomerAlgorithm(xAmzServerSideEncryptionCustomerAlgorithm string) ApiPOSTObjectRequest {
+ r.xAmzServerSideEncryptionCustomerAlgorithm = &xAmzServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+// Specifies the customer-provided encryption key for IONOS Object Storage to use in encrypting data. This value is used to store the object and then it is discarded; IONOS Object Storage does not store the encryption key. The key must be appropriate for use with the algorithm specified in the `x-amz-server-side-encryption-customer-algorithm` header.
+func (r ApiPOSTObjectRequest) XAmzServerSideEncryptionCustomerKey(xAmzServerSideEncryptionCustomerKey string) ApiPOSTObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKey = &xAmzServerSideEncryptionCustomerKey
+ return r
+}
+
+// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. IONOS Object Storage uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
+func (r ApiPOSTObjectRequest) XAmzServerSideEncryptionCustomerKeyMD5(xAmzServerSideEncryptionCustomerKeyMD5 string) ApiPOSTObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKeyMD5 = &xAmzServerSideEncryptionCustomerKeyMD5
+ return r
+}
+
+// Specifies the IONOS Object Storage Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
+func (r ApiPOSTObjectRequest) XAmzServerSideEncryptionContext(xAmzServerSideEncryptionContext string) ApiPOSTObjectRequest {
+ r.xAmzServerSideEncryptionContext = &xAmzServerSideEncryptionContext
+ return r
+}
+
+// <p>Specifies whether IONOS Object Storage should use an S3 Bucket Key for object encryption with server-side encryption. Setting this header to `true` causes IONOS Object Storage to use an Object Storage bucket Key for object encryption.</p> <p>Specifying this header with a PUT operation doesn’t affect bucket-level settings for S3 Bucket Key.</p>
+func (r ApiPOSTObjectRequest) XAmzServerSideEncryptionBucketKeyEnabled(xAmzServerSideEncryptionBucketKeyEnabled bool) ApiPOSTObjectRequest {
+ r.xAmzServerSideEncryptionBucketKeyEnabled = &xAmzServerSideEncryptionBucketKeyEnabled
+ return r
+}
+
+func (r ApiPOSTObjectRequest) XAmzRequestPayer(xAmzRequestPayer string) ApiPOSTObjectRequest {
+ r.xAmzRequestPayer = &xAmzRequestPayer
+ return r
+}
+
+// The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, \"Key1=Value1\")
+func (r ApiPOSTObjectRequest) XAmzTagging(xAmzTagging string) ApiPOSTObjectRequest {
+ r.xAmzTagging = &xAmzTagging
+ return r
+}
+
+// The Object Lock mode that you want to apply to this object.
+func (r ApiPOSTObjectRequest) XAmzObjectLockMode(xAmzObjectLockMode string) ApiPOSTObjectRequest {
+ r.xAmzObjectLockMode = &xAmzObjectLockMode
+ return r
+}
+
+// The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.
+func (r ApiPOSTObjectRequest) XAmzObjectLockRetainUntilDate(xAmzObjectLockRetainUntilDate time.Time) ApiPOSTObjectRequest {
+ r.xAmzObjectLockRetainUntilDate = &xAmzObjectLockRetainUntilDate
+ return r
+}
+
+// Specifies whether a legal hold will be applied to this object.
+func (r ApiPOSTObjectRequest) XAmzObjectLockLegalHold(xAmzObjectLockLegalHold string) ApiPOSTObjectRequest {
+ r.xAmzObjectLockLegalHold = &xAmzObjectLockLegalHold
+ return r
+}
+
+func (r ApiPOSTObjectRequest) Execute() (map[string]interface{}, *shared.APIResponse, error) {
+ return r.ApiService.POSTObjectExecute(r)
+}
+
+/*
+POSTObject POSTObject
+
+ The POST operation adds an object to a specified bucket using HTML forms. POST is an alternate form of PUT that enables browser-based uploads of objects into buckets. Parameters passed to PUT via HTTP Headers are instead passed to POST as form fields in the multipart/form-data encoded message body.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Key name of the object to post.
+ @return ApiPOSTObjectRequest
+*/
+func (a *ObjectsApiService) POSTObject(ctx context.Context, bucket string, key string) ApiPOSTObjectRequest {
+ return ApiPOSTObjectRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return map[string]interface{}
+func (a *ObjectsApiService) POSTObjectExecute(r ApiPOSTObjectRequest) (map[string]interface{}, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue map[string]interface{}
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.POSTObject")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+ if r.pOSTObjectRequest == nil {
+ return localVarReturnValue, nil, reportError("pOSTObjectRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cacheControl != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Cache-Control", r.cacheControl, "")
+ }
+ if r.contentDisposition != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Disposition", r.contentDisposition, "")
+ }
+ if r.contentEncoding != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Encoding", r.contentEncoding, "")
+ }
+ if r.contentLanguage != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Language", r.contentLanguage, "")
+ }
+ if r.contentLength != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Length", r.contentLength, "")
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ if r.contentType != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Type", r.contentType, "")
+ }
+ if r.expires != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Expires", r.expires, "")
+ }
+ if r.xAmzServerSideEncryption != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption", r.xAmzServerSideEncryption, "")
+ }
+ if r.xAmzStorageClass != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-storage-class", r.xAmzStorageClass, "")
+ }
+ if r.xAmzWebsiteRedirectLocation != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-website-redirect-location", r.xAmzWebsiteRedirectLocation, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-algorithm", r.xAmzServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKey != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key", r.xAmzServerSideEncryptionCustomerKey, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKeyMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key-MD5", r.xAmzServerSideEncryptionCustomerKeyMD5, "")
+ }
+ if r.xAmzServerSideEncryptionContext != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-context", r.xAmzServerSideEncryptionContext, "")
+ }
+ if r.xAmzServerSideEncryptionBucketKeyEnabled != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-bucket-key-enabled", r.xAmzServerSideEncryptionBucketKeyEnabled, "")
+ }
+ if r.xAmzRequestPayer != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-request-payer", r.xAmzRequestPayer, "")
+ }
+ if r.xAmzTagging != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-tagging", r.xAmzTagging, "")
+ }
+ if r.xAmzObjectLockMode != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-mode", r.xAmzObjectLockMode, "")
+ }
+ if r.xAmzObjectLockRetainUntilDate != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-retain-until-date", r.xAmzObjectLockRetainUntilDate, "")
+ }
+ if r.xAmzObjectLockLegalHold != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-legal-hold", r.xAmzObjectLockLegalHold, "")
+ }
+ // body params
+ localVarPostBody = r.pOSTObjectRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "POSTObject",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutObjectRequest struct {
+ ctx context.Context
+ ApiService *ObjectsApiService
+ bucket string
+ key string
+ body *os.File
+ cacheControl *string
+ contentDisposition *string
+ contentEncoding *string
+ contentLanguage *string
+ contentLength *int32
+ contentMD5 *string
+ contentType *string
+ expires *time.Time
+ xAmzServerSideEncryption *string
+ xAmzStorageClass *string
+ xAmzWebsiteRedirectLocation *string
+ xAmzServerSideEncryptionCustomerAlgorithm *string
+ xAmzServerSideEncryptionCustomerKey *string
+ xAmzServerSideEncryptionCustomerKeyMD5 *string
+ xAmzServerSideEncryptionContext *string
+ xAmzRequestPayer *string
+ xAmzTagging *string
+ xAmzObjectLockMode *string
+ xAmzObjectLockRetainUntilDate *time.Time
+ xAmzObjectLockLegalHold *string
+ xAmzMeta *map[string]string
+}
+
+func (r ApiPutObjectRequest) Body(body *os.File) ApiPutObjectRequest {
+ r.body = body
+ return r
+}
+
+// Can be used to specify caching behavior along the request/reply chain. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9\">Cache-Control</a>.
+func (r ApiPutObjectRequest) CacheControl(cacheControl string) ApiPutObjectRequest {
+ r.cacheControl = &cacheControl
+ return r
+}
+
+// Specifies presentational information for the object. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1\">Content-Disposition</a>.
+func (r ApiPutObjectRequest) ContentDisposition(contentDisposition string) ApiPutObjectRequest {
+ r.contentDisposition = &contentDisposition
+ return r
+}
+
+// Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11\">Content-Encoding</a>.
+func (r ApiPutObjectRequest) ContentEncoding(contentEncoding string) ApiPutObjectRequest {
+ r.contentEncoding = &contentEncoding
+ return r
+}
+
+// The language the content is in.
+func (r ApiPutObjectRequest) ContentLanguage(contentLanguage string) ApiPutObjectRequest {
+ r.contentLanguage = &contentLanguage
+ return r
+}
+
+// Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13\">Content-Length</a>.
+func (r ApiPutObjectRequest) ContentLength(contentLength int32) ApiPutObjectRequest {
+ r.contentLength = &contentLength
+ return r
+}
+
+func (r ApiPutObjectRequest) ContentMD5(contentMD5 string) ApiPutObjectRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+// A standard MIME type describing the format of the contents. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17\">Content-Type</a>.
+func (r ApiPutObjectRequest) ContentType(contentType string) ApiPutObjectRequest {
+ r.contentType = &contentType
+ return r
+}
+
+// The date and time at which the object is no longer cacheable. For more information, see <a href=\"http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21\">Expires</a>.
+func (r ApiPutObjectRequest) Expires(expires time.Time) ApiPutObjectRequest {
+ r.expires = &expires
+ return r
+}
+
+// The server-side encryption algorithm used when storing this object in IONOS Object Storage (AES256).
+func (r ApiPutObjectRequest) XAmzServerSideEncryption(xAmzServerSideEncryption string) ApiPutObjectRequest {
+ r.xAmzServerSideEncryption = &xAmzServerSideEncryption
+ return r
+}
+
+// The valid value is `STANDARD`.
+func (r ApiPutObjectRequest) XAmzStorageClass(xAmzStorageClass string) ApiPutObjectRequest {
+ r.xAmzStorageClass = &xAmzStorageClass
+ return r
+}
+
+// <p>If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. IONOS Object Storage stores the value of this header in the object metadata.</p> <p>In the following example, the request header sets the redirect to an object (anotherPage.html) in the same bucket:</p> <p> `x-amz-website-redirect-location: /anotherPage.html` </p> <p>In the following example, the request header sets the object redirect to another website:</p> <p> `x-amz-website-redirect-location: http://www.example.com/` </p>
+func (r ApiPutObjectRequest) XAmzWebsiteRedirectLocation(xAmzWebsiteRedirectLocation string) ApiPutObjectRequest {
+ r.xAmzWebsiteRedirectLocation = &xAmzWebsiteRedirectLocation
+ return r
+}
+
+// Specifies the algorithm to use to when encrypting the object. The valid option is `AES256`.
+func (r ApiPutObjectRequest) XAmzServerSideEncryptionCustomerAlgorithm(xAmzServerSideEncryptionCustomerAlgorithm string) ApiPutObjectRequest {
+ r.xAmzServerSideEncryptionCustomerAlgorithm = &xAmzServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+// Specifies the 256-bit, base64-encoded encryption key to use to encrypt and decrypt your data. For example, `4ZRNYBCCvL0YZeqo3f2+9qDyIfnLdbg5S99R2XWr0aw=`.
+func (r ApiPutObjectRequest) XAmzServerSideEncryptionCustomerKey(xAmzServerSideEncryptionCustomerKey string) ApiPutObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKey = &xAmzServerSideEncryptionCustomerKey
+ return r
+}
+
+// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. IONOS Object Storage uses this header for a message integrity check to ensure that the encryption key was transmitted without error. For example, `bPU7G1zD2MlOi5gqnkRqZg==`.
+func (r ApiPutObjectRequest) XAmzServerSideEncryptionCustomerKeyMD5(xAmzServerSideEncryptionCustomerKeyMD5 string) ApiPutObjectRequest {
+ r.xAmzServerSideEncryptionCustomerKeyMD5 = &xAmzServerSideEncryptionCustomerKeyMD5
+ return r
+}
+
+// Specifies the IONOS Object Storage Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.
+func (r ApiPutObjectRequest) XAmzServerSideEncryptionContext(xAmzServerSideEncryptionContext string) ApiPutObjectRequest {
+ r.xAmzServerSideEncryptionContext = &xAmzServerSideEncryptionContext
+ return r
+}
+
+func (r ApiPutObjectRequest) XAmzRequestPayer(xAmzRequestPayer string) ApiPutObjectRequest {
+ r.xAmzRequestPayer = &xAmzRequestPayer
+ return r
+}
+
+// The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, \"Key1=Value1\")
+func (r ApiPutObjectRequest) XAmzTagging(xAmzTagging string) ApiPutObjectRequest {
+ r.xAmzTagging = &xAmzTagging
+ return r
+}
+
+// The Object Lock mode that you want to apply to this object.
+func (r ApiPutObjectRequest) XAmzObjectLockMode(xAmzObjectLockMode string) ApiPutObjectRequest {
+ r.xAmzObjectLockMode = &xAmzObjectLockMode
+ return r
+}
+
+// The date and time when you want this object's Object Lock to expire. Must be formatted as a timestamp parameter.
+func (r ApiPutObjectRequest) XAmzObjectLockRetainUntilDate(xAmzObjectLockRetainUntilDate time.Time) ApiPutObjectRequest {
+ r.xAmzObjectLockRetainUntilDate = &xAmzObjectLockRetainUntilDate
+ return r
+}
+
+// Specifies whether a legal hold will be applied to this object.
+func (r ApiPutObjectRequest) XAmzObjectLockLegalHold(xAmzObjectLockLegalHold string) ApiPutObjectRequest {
+ r.xAmzObjectLockLegalHold = &xAmzObjectLockLegalHold
+ return r
+}
+
+// A map of metadata to store with the object in S3.
+func (r ApiPutObjectRequest) XAmzMeta(xAmzMeta map[string]string) ApiPutObjectRequest {
+ r.xAmzMeta = &xAmzMeta
+ return r
+}
+
+func (r ApiPutObjectRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutObjectExecute(r)
+}
+
+/*
+PutObject PutObject
+
+Adds an object to a bucket. You must have WRITE permissions on a bucket to add an object to it.
IONOS Object Storage never adds partial objects; if you receive a success response, IONOS Object Storage added the entire object to the bucket.
IONOS Object Storage is a distributed system. If it receives multiple write requests for the same object simultaneously, it overwrites all but the last object written. IONOS Object Storage does not provide object locking; if you need this, make sure to build it into your application layer or use versioning instead.
To ensure that data is not corrupted traversing the network, use the `Content-MD5` header. When you use this header, IONOS Object Storage checks the object against the provided MD5 value and, if they do not match, returns an error. Additionally, you can calculate the MD5 while putting an object to IONOS Object Storage and compare the returned ETag to the calculated MD5 value.
-
To successfully complete the `PutObject` request, you must have the `PutObject` in your permissions.
-
To successfully change the objects acl of your `PutObject` request, you must have the `PutObjectAcl` in your permissions.
-
The `Content-MD5` header is required for any request to upload an object with a retention period configured using IONOS Object Storage Object Lock .
Versioning
If you enable versioning for a bucket, IONOS Object Storage automatically generates a unique version ID for the object being stored. IONOS Object Storage returns this ID in the response. When you enable versioning for a bucket, if IONOS Object Storage receives multiple write requests for the same object simultaneously, it stores all of the objects.
+Server-side Encryption with IONOS Object Storage managed keys (SSE-S3)
You can optionally request server-side encryption. With server-side encryption, IONOS Object Storage encrypts your data as it writes it to disks in its data centers and decrypts the data when you access it.
- the SSE-S3 encryption can be set as the default encryption for the bucket using PutBucketEncryption. This way all the newly created objects will be protected with SSE-S3 encryption even it was not specified in the `PutObject` operation.
- the SSE-S3 encryption can be applied to the object at the time of upload by setting `x-amz-server-side-encryption` header to `AES256`. This can be skipped if the default encryption has been set up for the bucket as described in the previous clause.
+Server-side Encryption with customer managed keys (SSE-C)
In order to apply encryption with customer-provided keys (SSE-C) to the uploading object add these headers to the request: - `x-amz-server-side-encryption-customer-algorithm` = `AES256`
- `x-amz-server-side-encryption-customer-key` — the 256-bit, base64-encoded encryption key to use to encrypt and decrypt your data. You might use these commands to generate it:
- to create the file with a key: `openssl rand 32 -out my-key.key`
- to get base64-encoded string: `openssl enc -base64 -in my-key.key`, the example of the output: `4ZRNYBCCvL0YZeqo3f2+9qDyIfnLdbg5S99R2XWr0aw=`.
`x-amz-server-side-encryption-customer-key-MD5` — the base64-encoded 128-bit MD5 digest of the encryption key. Generate it with the following command:
`echo my-key.key | openssl dgst -md5 -binary | openssl enc -base64`.
The example of the output: `bPU7G1zD2MlOi5gqnkRqZg==`. NOTE:
- The SSE-C encryption will override the SSE-S3 encryption if the last one was enabled as a default encryption for the bucket.
- In the response, IONOS Object Storage returns the encryption algorithm and MD5 of the encryption key that you specified when uploading the object. The ETag that is returned is not the MD5 of the object.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Object key for which the PUT operation was initiated.
+ @return ApiPutObjectRequest
+*/
+func (a *ObjectsApiService) PutObject(ctx context.Context, bucket string, key string) ApiPutObjectRequest {
+ return ApiPutObjectRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+func (a *ObjectsApiService) PutObjectExecute(r ApiPutObjectRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ObjectsApiService.PutObject")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return nil, reportError("key must have at least 1 elements")
+ }
+ if r.body == nil {
+ return nil, reportError("body is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"text/plain"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"text/plain"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cacheControl != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Cache-Control", r.cacheControl, "")
+ }
+ if r.contentDisposition != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Disposition", r.contentDisposition, "")
+ }
+ if r.contentEncoding != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Encoding", r.contentEncoding, "")
+ }
+ if r.contentLanguage != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Language", r.contentLanguage, "")
+ }
+ if r.contentLength != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Length", r.contentLength, "")
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ if r.contentType != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Type", r.contentType, "")
+ }
+ if r.expires != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Expires", r.expires, "")
+ }
+ if r.xAmzServerSideEncryption != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption", r.xAmzServerSideEncryption, "")
+ }
+ if r.xAmzStorageClass != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-storage-class", r.xAmzStorageClass, "")
+ }
+ if r.xAmzWebsiteRedirectLocation != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-website-redirect-location", r.xAmzWebsiteRedirectLocation, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-algorithm", r.xAmzServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKey != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key", r.xAmzServerSideEncryptionCustomerKey, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKeyMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key-MD5", r.xAmzServerSideEncryptionCustomerKeyMD5, "")
+ }
+ if r.xAmzServerSideEncryptionContext != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-context", r.xAmzServerSideEncryptionContext, "")
+ }
+ if r.xAmzRequestPayer != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-request-payer", r.xAmzRequestPayer, "")
+ }
+ if r.xAmzTagging != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-tagging", r.xAmzTagging, "")
+ }
+ if r.xAmzObjectLockMode != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-mode", r.xAmzObjectLockMode, "")
+ }
+ if r.xAmzObjectLockRetainUntilDate != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-retain-until-date", r.xAmzObjectLockRetainUntilDate, "")
+ }
+ if r.xAmzObjectLockLegalHold != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-legal-hold", r.xAmzObjectLockLegalHold, "")
+ }
+ if r.xAmzMeta != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-meta", r.xAmzMeta, "")
+ }
+ // body params
+ localVarPostBody = r.body
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutObject",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_policy.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_policy.go
new file mode 100644
index 0000000000..0a3154a74b
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_policy.go
@@ -0,0 +1,681 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// PolicyApiService PolicyApi service
+type PolicyApiService service
+
+type ApiDeleteBucketPolicyRequest struct {
+ ctx context.Context
+ ApiService *PolicyApiService
+ bucket string
+}
+
+func (r ApiDeleteBucketPolicyRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.DeleteBucketPolicyExecute(r)
+}
+
+/*
+DeleteBucketPolicy DeleteBucketPolicy
+
+Deletes the policy of a specified bucket.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:DeleteBucketPolicy` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+**Note:** The bucket owner can always perform this operation, even if the policy explicitly denies access to it.
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeleteBucketPolicyRequest
+*/
+func (a *PolicyApiService) DeleteBucketPolicy(ctx context.Context, bucket string) ApiDeleteBucketPolicyRequest {
+ return ApiDeleteBucketPolicyRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *PolicyApiService) DeleteBucketPolicyExecute(r ApiDeleteBucketPolicyRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyApiService.DeleteBucketPolicy")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?policy"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteBucketPolicy",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiGetBucketPolicyRequest struct {
+ ctx context.Context
+ ApiService *PolicyApiService
+ bucket string
+}
+
+func (r ApiGetBucketPolicyRequest) Execute() (*BucketPolicy, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketPolicyExecute(r)
+}
+
+/*
+GetBucketPolicy GetBucketPolicy
+
+Returns the policy of a specified bucket.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetBucketPolicy` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+**Note:** The bucket owner can always perform this operation, even if the policy explicitly denies access to it.
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketPolicyRequest
+*/
+func (a *PolicyApiService) GetBucketPolicy(ctx context.Context, bucket string) ApiGetBucketPolicyRequest {
+ return ApiGetBucketPolicyRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return BucketPolicy
+func (a *PolicyApiService) GetBucketPolicyExecute(r ApiGetBucketPolicyRequest) (*BucketPolicy, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *BucketPolicy
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyApiService.GetBucketPolicy")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?policy"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json", "application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketPolicy",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiGetBucketPolicyStatusRequest struct {
+ ctx context.Context
+ ApiService *PolicyApiService
+ bucket string
+}
+
+func (r ApiGetBucketPolicyStatusRequest) Execute() (*PolicyStatus, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketPolicyStatusExecute(r)
+}
+
+/*
+GetBucketPolicyStatus GetBucketPolicyStatus
+
+Retrieves the policy status of a bucket, indicating whether the bucket is public.
+
+IONOS Object Storage considers a bucket policy to be "public" if any statement in the policy is public.
+A statement is considered public if the `Effect` is `Allow` and the `Principal` has a wildcard -- unless there
+is an `IpAddress:{aws:SourceIp}` condition associated with the statement that restricts the requesting
+source IP to one or more specified IP addresses.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetBucketPolicyStatus` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketPolicyStatusRequest
+*/
+func (a *PolicyApiService) GetBucketPolicyStatus(ctx context.Context, bucket string) ApiGetBucketPolicyStatusRequest {
+ return ApiGetBucketPolicyStatusRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return PolicyStatus
+func (a *PolicyApiService) GetBucketPolicyStatusExecute(r ApiGetBucketPolicyStatusRequest) (*PolicyStatus, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *PolicyStatus
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyApiService.GetBucketPolicyStatus")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?policyStatus"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketPolicyStatus",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutBucketPolicyRequest struct {
+ ctx context.Context
+ ApiService *PolicyApiService
+ bucket string
+ bucketPolicy *BucketPolicy
+ contentMD5 *string
+}
+
+func (r ApiPutBucketPolicyRequest) BucketPolicy(bucketPolicy BucketPolicy) ApiPutBucketPolicyRequest {
+ r.bucketPolicy = &bucketPolicy
+ return r
+}
+
+func (r ApiPutBucketPolicyRequest) ContentMD5(contentMD5 string) ApiPutBucketPolicyRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutBucketPolicyRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutBucketPolicyExecute(r)
+}
+
+/*
+PutBucketPolicy PutBucketPolicy
+
+Applies a bucket policy to a bucket.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:PutBucketPolicy` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+**Note:** The bucket owner can always perform this operation, even if the policy explicitly denies access to it.
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+- The `x-amz-confirm-remove-self-bucket-access` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutBucketPolicyRequest
+*/
+func (a *PolicyApiService) PutBucketPolicy(ctx context.Context, bucket string) ApiPutBucketPolicyRequest {
+ return ApiPutBucketPolicyRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *PolicyApiService) PutBucketPolicyExecute(r ApiPutBucketPolicyRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyApiService.PutBucketPolicy")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?policy"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.bucketPolicy == nil {
+ return nil, reportError("bucketPolicy is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/json"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.bucketPolicy
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutBucketPolicy",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_public_access_block.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_public_access_block.go
new file mode 100644
index 0000000000..649955d882
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_public_access_block.go
@@ -0,0 +1,517 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// PublicAccessBlockApiService PublicAccessBlockApi service
+type PublicAccessBlockApiService service
+
+type ApiDeletePublicAccessBlockRequest struct {
+ ctx context.Context
+ ApiService *PublicAccessBlockApiService
+ bucket string
+}
+
+func (r ApiDeletePublicAccessBlockRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.DeletePublicAccessBlockExecute(r)
+}
+
+/*
+DeletePublicAccessBlock DeletePublicAccessBlock
+
+Deletes the public access configuration for an Object Storage bucket.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:DeleteBucketPublicAccessBlock` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeletePublicAccessBlockRequest
+*/
+func (a *PublicAccessBlockApiService) DeletePublicAccessBlock(ctx context.Context, bucket string) ApiDeletePublicAccessBlockRequest {
+ return ApiDeletePublicAccessBlockRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *PublicAccessBlockApiService) DeletePublicAccessBlockExecute(r ApiDeletePublicAccessBlockRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAccessBlockApiService.DeletePublicAccessBlock")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?publicAccessBlock"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeletePublicAccessBlock",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiGetPublicAccessBlockRequest struct {
+ ctx context.Context
+ ApiService *PublicAccessBlockApiService
+ bucket string
+}
+
+func (r ApiGetPublicAccessBlockRequest) Execute() (*BlockPublicAccessOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetPublicAccessBlockExecute(r)
+}
+
+/*
+GetPublicAccessBlock GetPublicAccessBlock
+
+Retrieves the public access configuration for a bucket.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetBucketPublicAccessBlock` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetPublicAccessBlockRequest
+*/
+func (a *PublicAccessBlockApiService) GetPublicAccessBlock(ctx context.Context, bucket string) ApiGetPublicAccessBlockRequest {
+ return ApiGetPublicAccessBlockRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return BlockPublicAccessOutput
+func (a *PublicAccessBlockApiService) GetPublicAccessBlockExecute(r ApiGetPublicAccessBlockRequest) (*BlockPublicAccessOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *BlockPublicAccessOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAccessBlockApiService.GetPublicAccessBlock")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?publicAccessBlock"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/json", "application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetPublicAccessBlock",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutPublicAccessBlockRequest struct {
+ ctx context.Context
+ ApiService *PublicAccessBlockApiService
+ bucket string
+ blockPublicAccessPayload *BlockPublicAccessPayload
+ contentMD5 *string
+}
+
+func (r ApiPutPublicAccessBlockRequest) BlockPublicAccessPayload(blockPublicAccessPayload BlockPublicAccessPayload) ApiPutPublicAccessBlockRequest {
+ r.blockPublicAccessPayload = &blockPublicAccessPayload
+ return r
+}
+
+func (r ApiPutPublicAccessBlockRequest) ContentMD5(contentMD5 string) ApiPutPublicAccessBlockRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutPublicAccessBlockRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutPublicAccessBlockExecute(r)
+}
+
+/*
+PutPublicAccessBlock PutPublicAccessBlock
+
+Blocks public access to an Object Storage bucket based on the specified parameters.
+
+This operation modifies the bucket's settings to either prevent public access entirely
+or impose restrictions based on specific conditions.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:PutBucketPublicAccessBlock` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+**Note:** The bucket owner can always perform this operation, even if the policy explicitly denies access to it.
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+- The `x-amz-confirm-remove-self-bucket-access` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutPublicAccessBlockRequest
+*/
+func (a *PublicAccessBlockApiService) PutPublicAccessBlock(ctx context.Context, bucket string) ApiPutPublicAccessBlockRequest {
+ return ApiPutPublicAccessBlockRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *PublicAccessBlockApiService) PutPublicAccessBlockExecute(r ApiPutPublicAccessBlockRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublicAccessBlockApiService.PutPublicAccessBlock")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?publicAccessBlock"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.blockPublicAccessPayload == nil {
+ return nil, reportError("blockPublicAccessPayload is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.blockPublicAccessPayload
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutPublicAccessBlock",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 403 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 404 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_replication.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_replication.go
new file mode 100644
index 0000000000..31b2fc233c
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_replication.go
@@ -0,0 +1,182 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// ReplicationApiService ReplicationApi service
+type ReplicationApiService service
+
+type ApiGetBucketReplicationRequest struct {
+ ctx context.Context
+ ApiService *ReplicationApiService
+ bucket string
+ replication *bool
+}
+
+func (r ApiGetBucketReplicationRequest) Replication(replication bool) ApiGetBucketReplicationRequest {
+ r.replication = &replication
+ return r
+}
+
+func (r ApiGetBucketReplicationRequest) Execute() (*GetBucketReplicationOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketReplicationExecute(r)
+}
+
+/*
+GetBucketReplication GetBucketReplication
+
+Returns the replication configuration of a bucket.
+
+The replication configuration may take a while to propagate to all IONOS Object Storage systems.
+For example, when you apply a new configuration with a PUT request or delete a configuration using
+a DELETE request. Similarly, a GET request may retrieve the previous state of the configuration,
+or it may still exist if you use a DELETE request.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetBucketReplication` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketReplicationRequest
+*/
+func (a *ReplicationApiService) GetBucketReplication(ctx context.Context, bucket string) ApiGetBucketReplicationRequest {
+ return ApiGetBucketReplicationRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetBucketReplicationOutput
+func (a *ReplicationApiService) GetBucketReplicationExecute(r ApiGetBucketReplicationRequest) (*GetBucketReplicationOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetBucketReplicationOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ReplicationApiService.GetBucketReplication")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?replication"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.replication == nil {
+ return localVarReturnValue, nil, reportError("replication is required and must be specified")
+ }
+
+ parameterAddToHeaderOrQuery(localVarQueryParams, "replication", r.replication, "")
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketReplication",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_tagging.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_tagging.go
new file mode 100644
index 0000000000..ec595bafc6
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_tagging.go
@@ -0,0 +1,897 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// TaggingApiService TaggingApi service
+type TaggingApiService service
+
+type ApiDeleteBucketTaggingRequest struct {
+ ctx context.Context
+ ApiService *TaggingApiService
+ bucket string
+}
+
+func (r ApiDeleteBucketTaggingRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.DeleteBucketTaggingExecute(r)
+}
+
+/*
+DeleteBucketTagging DeleteBucketTagging
+
+Deletes the tags from the bucket.
To use this operation, you must have permission to perform the `PutBucketTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeleteBucketTaggingRequest
+*/
+func (a *TaggingApiService) DeleteBucketTagging(ctx context.Context, bucket string) ApiDeleteBucketTaggingRequest {
+ return ApiDeleteBucketTaggingRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *TaggingApiService) DeleteBucketTaggingExecute(r ApiDeleteBucketTaggingRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaggingApiService.DeleteBucketTagging")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?tagging"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteBucketTagging",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiDeleteObjectTaggingRequest struct {
+ ctx context.Context
+ ApiService *TaggingApiService
+ bucket string
+ key string
+ versionId *string
+}
+
+// The versionId of the object that the tag-set will be removed from.
+func (r ApiDeleteObjectTaggingRequest) VersionId(versionId string) ApiDeleteObjectTaggingRequest {
+ r.versionId = &versionId
+ return r
+}
+
+func (r ApiDeleteObjectTaggingRequest) Execute() (map[string]interface{}, *shared.APIResponse, error) {
+ return r.ApiService.DeleteObjectTaggingExecute(r)
+}
+
+/*
+DeleteObjectTagging DeleteObjectTagging
+
+Removes the entire tag set from the specified object.
To use this operation, you must have permission to perform the `DeleteObjectTagging` operation.
To delete tags of a specific object version, add the `versionId` query parameter in the request. You will need permission for the `DeleteObjectVersionTagging` operation.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key The key that identifies the object in the bucket from which to remove all tags.
+ @return ApiDeleteObjectTaggingRequest
+*/
+func (a *TaggingApiService) DeleteObjectTagging(ctx context.Context, bucket string, key string) ApiDeleteObjectTaggingRequest {
+ return ApiDeleteObjectTaggingRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return map[string]interface{}
+func (a *TaggingApiService) DeleteObjectTaggingExecute(r ApiDeleteObjectTaggingRequest) (map[string]interface{}, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue map[string]interface{}
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaggingApiService.DeleteObjectTagging")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?tagging"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteObjectTagging",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiGetBucketTaggingRequest struct {
+ ctx context.Context
+ ApiService *TaggingApiService
+ bucket string
+}
+
+func (r ApiGetBucketTaggingRequest) Execute() (*GetBucketTaggingOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketTaggingExecute(r)
+}
+
+/*
+GetBucketTagging GetBucketTagging
+
+Returns the tag set associated with the bucket.
To use this operation, you must have permission to perform the `GetBucketTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.
`GetBucketTagging` has the following special error:
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketTaggingRequest
+*/
+func (a *TaggingApiService) GetBucketTagging(ctx context.Context, bucket string) ApiGetBucketTaggingRequest {
+ return ApiGetBucketTaggingRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetBucketTaggingOutput
+func (a *TaggingApiService) GetBucketTaggingExecute(r ApiGetBucketTaggingRequest) (*GetBucketTaggingOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetBucketTaggingOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaggingApiService.GetBucketTagging")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?tagging"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketTagging",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiGetObjectTaggingRequest struct {
+ ctx context.Context
+ ApiService *TaggingApiService
+ bucket string
+ key string
+ versionId *string
+}
+
+// The versionId of the object for which to get the tagging information.
+func (r ApiGetObjectTaggingRequest) VersionId(versionId string) ApiGetObjectTaggingRequest {
+ r.versionId = &versionId
+ return r
+}
+
+func (r ApiGetObjectTaggingRequest) Execute() (*GetObjectTaggingOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetObjectTaggingExecute(r)
+}
+
+/*
+GetObjectTagging GetObjectTagging
+
+Returns the tag-set of an object. You send the GET request against the tagging subresource associated with the object.
To use this operation, you must have permission to perform the `GetObjectTagging` operation. By default, the GET operation returns information about current version of an object. For a versioned bucket, you can have multiple versions of an object in your bucket. To retrieve tags of any other version, use the versionId query parameter. You also need permission for the `GetObjectVersionTagging` operation.
By default, the bucket owner has this permission and can grant this permission to others.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Object key for which to get the tagging information.
+ @return ApiGetObjectTaggingRequest
+*/
+func (a *TaggingApiService) GetObjectTagging(ctx context.Context, bucket string, key string) ApiGetObjectTaggingRequest {
+ return ApiGetObjectTaggingRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetObjectTaggingOutput
+func (a *TaggingApiService) GetObjectTaggingExecute(r ApiGetObjectTaggingRequest) (*GetObjectTaggingOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetObjectTaggingOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaggingApiService.GetObjectTagging")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?tagging"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetObjectTagging",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutBucketTaggingRequest struct {
+ ctx context.Context
+ ApiService *TaggingApiService
+ bucket string
+ putBucketTaggingRequest *PutBucketTaggingRequest
+ contentMD5 *string
+}
+
+func (r ApiPutBucketTaggingRequest) PutBucketTaggingRequest(putBucketTaggingRequest PutBucketTaggingRequest) ApiPutBucketTaggingRequest {
+ r.putBucketTaggingRequest = &putBucketTaggingRequest
+ return r
+}
+
+func (r ApiPutBucketTaggingRequest) ContentMD5(contentMD5 string) ApiPutBucketTaggingRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutBucketTaggingRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutBucketTaggingExecute(r)
+}
+
+/*
+PutBucketTagging PutBucketTagging
+
+Sets the tags for a bucket.
When this operation sets the tags for a bucket, it will overwrite any current tags the bucket already has. You cannot use this operation to add tags to an existing list of tags.
To use this operation, you must have permissions to perform the `PutBucketTagging` operation. The bucket owner has this permission by default and can grant this permission to others.
`PutBucketTagging` has the following special errors:
-
Error code: `InvalidTagError`
-
Error code: `MalformedXMLError`
-
Error code: `OperationAbortedError `
-
Error code: `InternalError`
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutBucketTaggingRequest
+*/
+func (a *TaggingApiService) PutBucketTagging(ctx context.Context, bucket string) ApiPutBucketTaggingRequest {
+ return ApiPutBucketTaggingRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *TaggingApiService) PutBucketTaggingExecute(r ApiPutBucketTaggingRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaggingApiService.PutBucketTagging")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?tagging"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.putBucketTaggingRequest == nil {
+ return nil, reportError("putBucketTaggingRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.putBucketTaggingRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutBucketTagging",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiPutObjectTaggingRequest struct {
+ ctx context.Context
+ ApiService *TaggingApiService
+ bucket string
+ key string
+ putObjectTaggingRequest *PutObjectTaggingRequest
+ versionId *string
+ contentMD5 *string
+}
+
+func (r ApiPutObjectTaggingRequest) PutObjectTaggingRequest(putObjectTaggingRequest PutObjectTaggingRequest) ApiPutObjectTaggingRequest {
+ r.putObjectTaggingRequest = &putObjectTaggingRequest
+ return r
+}
+
+// The versionId of the object that the tag-set will be added to.
+func (r ApiPutObjectTaggingRequest) VersionId(versionId string) ApiPutObjectTaggingRequest {
+ r.versionId = &versionId
+ return r
+}
+
+func (r ApiPutObjectTaggingRequest) ContentMD5(contentMD5 string) ApiPutObjectTaggingRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutObjectTaggingRequest) Execute() (map[string]interface{}, *shared.APIResponse, error) {
+ return r.ApiService.PutObjectTaggingExecute(r)
+}
+
+/*
+PutObjectTagging PutObjectTagging
+
+Sets the supplied tag-set to an object that already exists in a bucket.
A tag is a key-value pair. You can associate tags with an object by sending a PUT request against the tagging subresource that is associated with the object. You can retrieve tags by sending a GET request.
Note that IONOS Object Storage limits the maximum number of tags to 10 tags per object.
To use this operation, you must have permission to perform the `PutObjectTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.
To put tags of any other version, use the `versionId` query parameter. You also need permission for the `PutObjectVersionTagging` operation.
Special Errors
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Name of the object key.
+ @return ApiPutObjectTaggingRequest
+*/
+func (a *TaggingApiService) PutObjectTagging(ctx context.Context, bucket string, key string) ApiPutObjectTaggingRequest {
+ return ApiPutObjectTaggingRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return map[string]interface{}
+func (a *TaggingApiService) PutObjectTaggingExecute(r ApiPutObjectTaggingRequest) (map[string]interface{}, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue map[string]interface{}
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaggingApiService.PutObjectTagging")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?tagging"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+ if r.putObjectTaggingRequest == nil {
+ return localVarReturnValue, nil, reportError("putObjectTaggingRequest is required and must be specified")
+ }
+
+ if r.versionId != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "versionId", r.versionId, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.putObjectTaggingRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutObjectTagging",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_uploads.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_uploads.go
new file mode 100644
index 0000000000..c0e564413e
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_uploads.go
@@ -0,0 +1,1524 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+ "time"
+)
+
+// UploadsApiService UploadsApi service
+type UploadsApiService service
+
+type ApiAbortMultipartUploadRequest struct {
+ ctx context.Context
+ ApiService *UploadsApiService
+ bucket string
+ key string
+ uploadId *string
+}
+
+// Upload ID that identifies the multipart upload.
+func (r ApiAbortMultipartUploadRequest) UploadId(uploadId string) ApiAbortMultipartUploadRequest {
+ r.uploadId = &uploadId
+ return r
+}
+
+func (r ApiAbortMultipartUploadRequest) Execute() (map[string]interface{}, *shared.APIResponse, error) {
+ return r.ApiService.AbortMultipartUploadExecute(r)
+}
+
+/*
+AbortMultipartUpload AbortMultipartUpload
+
+This operation aborts a multipart upload. After a multipart upload is aborted, no additional parts can be uploaded using that upload ID. The storage consumed by any previously uploaded parts will be freed. However, if any part uploads are currently in progress, those part uploads might or might not succeed. As a result, it might be necessary to abort a given multipart upload multiple times in order to completely free all storage consumed by all parts.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Key of the object for which the multipart upload was initiated. **Possible values:** length ≥ 1
+ @return ApiAbortMultipartUploadRequest
+*/
+func (a *UploadsApiService) AbortMultipartUpload(ctx context.Context, bucket string, key string) ApiAbortMultipartUploadRequest {
+ return ApiAbortMultipartUploadRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return map[string]interface{}
+func (a *UploadsApiService) AbortMultipartUploadExecute(r ApiAbortMultipartUploadRequest) (map[string]interface{}, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue map[string]interface{}
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsApiService.AbortMultipartUpload")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?uploadId"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+ if r.uploadId == nil {
+ return localVarReturnValue, nil, reportError("uploadId is required and must be specified")
+ }
+
+ parameterAddToHeaderOrQuery(localVarQueryParams, "uploadId", r.uploadId, "")
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml", "aplication/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "AbortMultipartUpload",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 480 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiCompleteMultipartUploadRequest struct {
+ ctx context.Context
+ ApiService *UploadsApiService
+ bucket string
+ key string
+ uploadId *string
+ example *Example
+}
+
+// ID for the initiated multipart upload.
+func (r ApiCompleteMultipartUploadRequest) UploadId(uploadId string) ApiCompleteMultipartUploadRequest {
+ r.uploadId = &uploadId
+ return r
+}
+
+func (r ApiCompleteMultipartUploadRequest) Example(example Example) ApiCompleteMultipartUploadRequest {
+ r.example = &example
+ return r
+}
+
+func (r ApiCompleteMultipartUploadRequest) Execute() (*CompleteMultipartUploadOutput, *shared.APIResponse, error) {
+ return r.ApiService.CompleteMultipartUploadExecute(r)
+}
+
+/*
+CompleteMultipartUpload CompleteMultipartUpload
+
+Completes a multipart upload by assembling previously uploaded parts.
After successfully uploading all relevant parts of an upload, you call this operation to complete the upload. When IONOS Object Storage receives this request, it concatenates all the parts in ascending order by part number to create a new object. The parts list must be included in the Complete Multipart Upload request. You must ensure that the parts list is complete. This operation concatenates the parts that you provide in the list. For each part in the list, you must provide the part number and the `ETag` value, returned after that part was uploaded.
A Complete Multipart Upload request could take several minutes to process. After IONOS Object Storage begins processing the request, it sends an HTTP response header indicating a 200 OK response. While processing is in progress, IONOS Object Storage sends white space characters on a regular basis to keep the connection from timing out. Because a request may fail after receiving the initial 200 OK response, it is advisable to check the response body to establish whether the request was successful.
`CompleteMultipartUpload` has the following special errors:
-
Error code: `EntityTooSmall`
-
Error code: `InvalidPart`
-
Error code: `InvalidPartOrder`
-
Error code: `NoSuchUpload`
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Object key for which the multipart upload was initiated.
+ @return ApiCompleteMultipartUploadRequest
+*/
+func (a *UploadsApiService) CompleteMultipartUpload(ctx context.Context, bucket string, key string) ApiCompleteMultipartUploadRequest {
+ return ApiCompleteMultipartUploadRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return CompleteMultipartUploadOutput
+func (a *UploadsApiService) CompleteMultipartUploadExecute(r ApiCompleteMultipartUploadRequest) (*CompleteMultipartUploadOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *CompleteMultipartUploadOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsApiService.CompleteMultipartUpload")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?uploadId"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+ if r.uploadId == nil {
+ return localVarReturnValue, nil, reportError("uploadId is required and must be specified")
+ }
+ if r.example == nil {
+ return localVarReturnValue, nil, reportError("example is required and must be specified")
+ }
+
+ parameterAddToHeaderOrQuery(localVarQueryParams, "uploadId", r.uploadId, "")
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ // body params
+ localVarPostBody = r.example
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "CompleteMultipartUpload",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiCreateMultipartUploadRequest struct {
+ ctx context.Context
+ ApiService *UploadsApiService
+ bucket string
+ key string
+ uploads *bool
+ cacheControl *string
+ contentDisposition *string
+ contentEncoding *string
+ contentType *string
+ expires *time.Time
+ xAmzServerSideEncryption *string
+ xAmzStorageClass *string
+ xAmzWebsiteRedirectLocation *string
+ xAmzServerSideEncryptionCustomerAlgorithm *string
+ xAmzServerSideEncryptionCustomerKey *string
+ xAmzServerSideEncryptionCustomerKeyMD5 *string
+ xAmzObjectLockMode *string
+ xAmzObjectLockRetainUntilDate *time.Time
+ xAmzObjectLockLegalHold *string
+ xAmzMeta *map[string]string
+}
+
+func (r ApiCreateMultipartUploadRequest) Uploads(uploads bool) ApiCreateMultipartUploadRequest {
+ r.uploads = &uploads
+ return r
+}
+
+// Specifies caching behavior along the request/reply chain.
+func (r ApiCreateMultipartUploadRequest) CacheControl(cacheControl string) ApiCreateMultipartUploadRequest {
+ r.cacheControl = &cacheControl
+ return r
+}
+
+// Specifies presentational information for the object.
+func (r ApiCreateMultipartUploadRequest) ContentDisposition(contentDisposition string) ApiCreateMultipartUploadRequest {
+ r.contentDisposition = &contentDisposition
+ return r
+}
+
+// Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
+func (r ApiCreateMultipartUploadRequest) ContentEncoding(contentEncoding string) ApiCreateMultipartUploadRequest {
+ r.contentEncoding = &contentEncoding
+ return r
+}
+
+// A standard MIME type describing the format of the object data.
+func (r ApiCreateMultipartUploadRequest) ContentType(contentType string) ApiCreateMultipartUploadRequest {
+ r.contentType = &contentType
+ return r
+}
+
+// The date and time at which the object is no longer cacheable.
+func (r ApiCreateMultipartUploadRequest) Expires(expires time.Time) ApiCreateMultipartUploadRequest {
+ r.expires = &expires
+ return r
+}
+
+// The server-side encryption algorithm used when storing this object in IONOS Object Storage (AES256).
+func (r ApiCreateMultipartUploadRequest) XAmzServerSideEncryption(xAmzServerSideEncryption string) ApiCreateMultipartUploadRequest {
+ r.xAmzServerSideEncryption = &xAmzServerSideEncryption
+ return r
+}
+
+// IONOS Object Storage uses the STANDARD Storage Class to store newly created objects. The STANDARD storage class provides high durability and high availability.
+func (r ApiCreateMultipartUploadRequest) XAmzStorageClass(xAmzStorageClass string) ApiCreateMultipartUploadRequest {
+ r.xAmzStorageClass = &xAmzStorageClass
+ return r
+}
+
+// If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. IONOS Object Storage stores the value of this header in the object metadata.
+func (r ApiCreateMultipartUploadRequest) XAmzWebsiteRedirectLocation(xAmzWebsiteRedirectLocation string) ApiCreateMultipartUploadRequest {
+ r.xAmzWebsiteRedirectLocation = &xAmzWebsiteRedirectLocation
+ return r
+}
+
+// Specifies the algorithm to use to when encrypting the object (AES256).
+func (r ApiCreateMultipartUploadRequest) XAmzServerSideEncryptionCustomerAlgorithm(xAmzServerSideEncryptionCustomerAlgorithm string) ApiCreateMultipartUploadRequest {
+ r.xAmzServerSideEncryptionCustomerAlgorithm = &xAmzServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+// Specifies the customer-provided encryption key for IONOS Object Storage to use in encrypting data. This value is used to store the object and then it is discarded; IONOS Object Storage does not store the encryption key. The key must be appropriate for use with the algorithm specified in the `x-amz-server-side-encryption-customer-algorithm` header.
+func (r ApiCreateMultipartUploadRequest) XAmzServerSideEncryptionCustomerKey(xAmzServerSideEncryptionCustomerKey string) ApiCreateMultipartUploadRequest {
+ r.xAmzServerSideEncryptionCustomerKey = &xAmzServerSideEncryptionCustomerKey
+ return r
+}
+
+// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. IONOS Object Storage uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
+func (r ApiCreateMultipartUploadRequest) XAmzServerSideEncryptionCustomerKeyMD5(xAmzServerSideEncryptionCustomerKeyMD5 string) ApiCreateMultipartUploadRequest {
+ r.xAmzServerSideEncryptionCustomerKeyMD5 = &xAmzServerSideEncryptionCustomerKeyMD5
+ return r
+}
+
+// Specifies the Object Lock mode that you want to apply to the uploaded object.
+func (r ApiCreateMultipartUploadRequest) XAmzObjectLockMode(xAmzObjectLockMode string) ApiCreateMultipartUploadRequest {
+ r.xAmzObjectLockMode = &xAmzObjectLockMode
+ return r
+}
+
+// Specifies the date and time when you want the Object Lock to expire.
+func (r ApiCreateMultipartUploadRequest) XAmzObjectLockRetainUntilDate(xAmzObjectLockRetainUntilDate time.Time) ApiCreateMultipartUploadRequest {
+ r.xAmzObjectLockRetainUntilDate = &xAmzObjectLockRetainUntilDate
+ return r
+}
+
+// Specifies whether you want to apply a Legal Hold to the uploaded object.
+func (r ApiCreateMultipartUploadRequest) XAmzObjectLockLegalHold(xAmzObjectLockLegalHold string) ApiCreateMultipartUploadRequest {
+ r.xAmzObjectLockLegalHold = &xAmzObjectLockLegalHold
+ return r
+}
+
+// A map of metadata to store with the object in S3.
+func (r ApiCreateMultipartUploadRequest) XAmzMeta(xAmzMeta map[string]string) ApiCreateMultipartUploadRequest {
+ r.xAmzMeta = &xAmzMeta
+ return r
+}
+
+func (r ApiCreateMultipartUploadRequest) Execute() (*CreateMultipartUploadOutput, *shared.APIResponse, error) {
+ return r.ApiService.CreateMultipartUploadExecute(r)
+}
+
+/*
+CreateMultipartUpload CreateMultipartUpload
+
+This operation initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent upload part requests. You also include this upload ID in the final request to either complete or abort the multipart upload request.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Object key for which the multipart upload is to be initiated.
+ @return ApiCreateMultipartUploadRequest
+*/
+func (a *UploadsApiService) CreateMultipartUpload(ctx context.Context, bucket string, key string) ApiCreateMultipartUploadRequest {
+ return ApiCreateMultipartUploadRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return CreateMultipartUploadOutput
+func (a *UploadsApiService) CreateMultipartUploadExecute(r ApiCreateMultipartUploadRequest) (*CreateMultipartUploadOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPost
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *CreateMultipartUploadOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsApiService.CreateMultipartUpload")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?uploads"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+ if r.uploads == nil {
+ return localVarReturnValue, nil, reportError("uploads is required and must be specified")
+ }
+
+ parameterAddToHeaderOrQuery(localVarQueryParams, "uploads", r.uploads, "")
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.cacheControl != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Cache-Control", r.cacheControl, "")
+ }
+ if r.contentDisposition != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Disposition", r.contentDisposition, "")
+ }
+ if r.contentEncoding != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Encoding", r.contentEncoding, "")
+ }
+ if r.contentType != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Type", r.contentType, "")
+ }
+ if r.expires != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Expires", r.expires, "")
+ }
+ if r.xAmzServerSideEncryption != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption", r.xAmzServerSideEncryption, "")
+ }
+ if r.xAmzStorageClass != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-storage-class", r.xAmzStorageClass, "")
+ }
+ if r.xAmzWebsiteRedirectLocation != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-website-redirect-location", r.xAmzWebsiteRedirectLocation, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-algorithm", r.xAmzServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKey != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key", r.xAmzServerSideEncryptionCustomerKey, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKeyMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key-MD5", r.xAmzServerSideEncryptionCustomerKeyMD5, "")
+ }
+ if r.xAmzObjectLockMode != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-mode", r.xAmzObjectLockMode, "")
+ }
+ if r.xAmzObjectLockRetainUntilDate != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-retain-until-date", r.xAmzObjectLockRetainUntilDate, "")
+ }
+ if r.xAmzObjectLockLegalHold != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-object-lock-legal-hold", r.xAmzObjectLockLegalHold, "")
+ }
+ if r.xAmzMeta != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-meta", r.xAmzMeta, "")
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "CreateMultipartUpload",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiListMultipartUploadsRequest struct {
+ ctx context.Context
+ ApiService *UploadsApiService
+ bucket string
+ uploads *bool
+ delimiter *string
+ encodingType *string
+ keyMarker *string
+ maxUploads *int32
+ prefix *string
+ uploadIdMarker *string
+ maxUploads2 *string
+ keyMarker2 *string
+ uploadIdMarker2 *string
+}
+
+func (r ApiListMultipartUploadsRequest) Uploads(uploads bool) ApiListMultipartUploadsRequest {
+ r.uploads = &uploads
+ return r
+}
+
+// <p>Character you use to group keys.</p> <p>All keys that contain the same string between the prefix, if specified, and the first occurrence of the delimiter after the prefix are grouped under a single result element, `CommonPrefixes`. If you don't specify the prefix parameter, then the substring starts at the beginning of the key. The keys that are grouped under `CommonPrefixes` result element are not returned elsewhere in the response.</p>
+func (r ApiListMultipartUploadsRequest) Delimiter(delimiter string) ApiListMultipartUploadsRequest {
+ r.delimiter = &delimiter
+ return r
+}
+
+func (r ApiListMultipartUploadsRequest) EncodingType(encodingType string) ApiListMultipartUploadsRequest {
+ r.encodingType = &encodingType
+ return r
+}
+
+// <p>Together with upload-id-marker, this parameter specifies the multipart upload after which listing should begin.</p> <p>If `upload-id-marker` is not specified, only the keys lexicographically greater than the specified `key-marker` will be included in the list.</p> <p>If `upload-id-marker` is specified, any multipart uploads for a key equal to the `key-marker` might also be included, provided those multipart uploads have upload IDs lexicographically greater than the specified `upload-id-marker`.</p>
+func (r ApiListMultipartUploadsRequest) KeyMarker(keyMarker string) ApiListMultipartUploadsRequest {
+ r.keyMarker = &keyMarker
+ return r
+}
+
+// Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response body. 1,000 is the maximum number of uploads that can be returned in a response.
+func (r ApiListMultipartUploadsRequest) MaxUploads(maxUploads int32) ApiListMultipartUploadsRequest {
+ r.maxUploads = &maxUploads
+ return r
+}
+
+// Lists in-progress uploads only for those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different grouping of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.)
+func (r ApiListMultipartUploadsRequest) Prefix(prefix string) ApiListMultipartUploadsRequest {
+ r.prefix = &prefix
+ return r
+}
+
+// Together with key-marker, specifies the multipart upload after which listing should begin. If key-marker is not specified, the upload-id-marker parameter is ignored. Otherwise, any multipart uploads for a key equal to the key-marker might be included in the list only if they have an upload ID lexicographically greater than the specified `upload-id-marker`.
+func (r ApiListMultipartUploadsRequest) UploadIdMarker(uploadIdMarker string) ApiListMultipartUploadsRequest {
+ r.uploadIdMarker = &uploadIdMarker
+ return r
+}
+
+// Pagination limit
+func (r ApiListMultipartUploadsRequest) MaxUploads2(maxUploads2 string) ApiListMultipartUploadsRequest {
+ r.maxUploads2 = &maxUploads2
+ return r
+}
+
+// Pagination token
+func (r ApiListMultipartUploadsRequest) KeyMarker2(keyMarker2 string) ApiListMultipartUploadsRequest {
+ r.keyMarker2 = &keyMarker2
+ return r
+}
+
+// Pagination token
+func (r ApiListMultipartUploadsRequest) UploadIdMarker2(uploadIdMarker2 string) ApiListMultipartUploadsRequest {
+ r.uploadIdMarker2 = &uploadIdMarker2
+ return r
+}
+
+func (r ApiListMultipartUploadsRequest) Execute() (*ListMultipartUploadsOutput, *shared.APIResponse, error) {
+ return r.ApiService.ListMultipartUploadsExecute(r)
+}
+
+/*
+ListMultipartUploads ListMultipartUploads
+
+This operation lists in-progress multipart uploads. An in-progress multipart upload is a multipart upload that has been initiated using the Initiate Multipart Upload request, but has not yet been completed or aborted.
This operation returns at most 1,000 multipart uploads in the response. 1,000 multipart uploads is the maximum number of uploads a response can include, which is also the default value. You can further limit the number of uploads in a response by specifying the `max-uploads` parameter in the response. If additional multipart uploads satisfy the list criteria, the response will contain an `IsTruncated` element with the value true. To list the additional multipart uploads, use the `key-marker` and `upload-id-marker` request parameters.
In the response, the uploads are sorted by key. If your application has initiated more than one multipart upload using the same object key, then uploads in the response are first sorted by key. Additionally, uploads are sorted in ascending order within each key by the upload initiation time.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiListMultipartUploadsRequest
+*/
+func (a *UploadsApiService) ListMultipartUploads(ctx context.Context, bucket string) ApiListMultipartUploadsRequest {
+ return ApiListMultipartUploadsRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return ListMultipartUploadsOutput
+func (a *UploadsApiService) ListMultipartUploadsExecute(r ApiListMultipartUploadsRequest) (*ListMultipartUploadsOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ListMultipartUploadsOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsApiService.ListMultipartUploads")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?uploads"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.uploads == nil {
+ return localVarReturnValue, nil, reportError("uploads is required and must be specified")
+ }
+
+ if r.delimiter != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "delimiter", r.delimiter, "")
+ }
+ if r.encodingType != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "encoding-type", r.encodingType, "")
+ }
+ if r.keyMarker != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "key-marker", r.keyMarker, "")
+ }
+ if r.maxUploads != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "max-uploads", r.maxUploads, "")
+ }
+ if r.prefix != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", r.prefix, "")
+ }
+ if r.uploadIdMarker != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "upload-id-marker", r.uploadIdMarker, "")
+ }
+ if r.maxUploads2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "MaxUploads", r.maxUploads2, "")
+ }
+ if r.keyMarker2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "KeyMarker", r.keyMarker2, "")
+ }
+ if r.uploadIdMarker2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "UploadIdMarker", r.uploadIdMarker2, "")
+ }
+ parameterAddToHeaderOrQuery(localVarQueryParams, "uploads", r.uploads, "")
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "ListMultipartUploads",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiListPartsRequest struct {
+ ctx context.Context
+ ApiService *UploadsApiService
+ bucket string
+ key string
+ uploadId *string
+ maxParts *int32
+ partNumberMarker *int32
+ partNumberMarker2 *string
+}
+
+// Upload ID identifying the multipart upload whose parts are being listed.
+func (r ApiListPartsRequest) UploadId(uploadId string) ApiListPartsRequest {
+ r.uploadId = &uploadId
+ return r
+}
+
+// Sets the maximum number of parts to return.
+func (r ApiListPartsRequest) MaxParts(maxParts int32) ApiListPartsRequest {
+ r.maxParts = &maxParts
+ return r
+}
+
+// Specifies the part after which listing should begin. Only parts with higher part numbers will be listed.
+func (r ApiListPartsRequest) PartNumberMarker(partNumberMarker int32) ApiListPartsRequest {
+ r.partNumberMarker = &partNumberMarker
+ return r
+}
+
+// Pagination token
+func (r ApiListPartsRequest) PartNumberMarker2(partNumberMarker2 string) ApiListPartsRequest {
+ r.partNumberMarker2 = &partNumberMarker2
+ return r
+}
+
+func (r ApiListPartsRequest) Execute() (*ListPartsOutput, *shared.APIResponse, error) {
+ return r.ApiService.ListPartsExecute(r)
+}
+
+/*
+ListParts ListParts
+
+Lists the parts that have been uploaded for a specific multipart upload. This operation must include the upload ID, which you obtain by sending the initiate multipart upload request. This request returns a maximum of 1,000 uploaded parts. The default number of parts returned is 1,000 parts. You can restrict the number of parts returned by specifying the `max-parts` request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an `IsTruncated` field with the value of true, and a `NextPartNumberMarker` element. In subsequent `ListParts` requests you can include the part-number-marker query string parameter and set its value to the `NextPartNumberMarker` field value from the previous response.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Object key for which the multipart upload was initiated.
+ @return ApiListPartsRequest
+*/
+func (a *UploadsApiService) ListParts(ctx context.Context, bucket string, key string) ApiListPartsRequest {
+ return ApiListPartsRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return ListPartsOutput
+func (a *UploadsApiService) ListPartsExecute(r ApiListPartsRequest) (*ListPartsOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ListPartsOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsApiService.ListParts")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?uploadId"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+ if r.uploadId == nil {
+ return localVarReturnValue, nil, reportError("uploadId is required and must be specified")
+ }
+
+ if r.maxParts != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "max-parts", r.maxParts, "")
+ }
+ if r.partNumberMarker != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "part-number-marker", r.partNumberMarker, "")
+ }
+ parameterAddToHeaderOrQuery(localVarQueryParams, "uploadId", r.uploadId, "")
+ if r.partNumberMarker2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "PartNumberMarker", r.partNumberMarker2, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "ListParts",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiUploadPartRequest struct {
+ ctx context.Context
+ ApiService *UploadsApiService
+ bucket string
+ key string
+ partNumber *int32
+ uploadId *string
+ uploadPartRequest *UploadPartRequest
+ contentLength *int32
+ contentMD5 *string
+ xAmzServerSideEncryptionCustomerAlgorithm *string
+ xAmzServerSideEncryptionCustomerKey *string
+ xAmzServerSideEncryptionCustomerKeyMD5 *string
+}
+
+// Part number of part being uploaded. This is a positive integer between 1 and 10,000.
+func (r ApiUploadPartRequest) PartNumber(partNumber int32) ApiUploadPartRequest {
+ r.partNumber = &partNumber
+ return r
+}
+
+// Upload ID identifying the multipart upload whose part is being uploaded.
+func (r ApiUploadPartRequest) UploadId(uploadId string) ApiUploadPartRequest {
+ r.uploadId = &uploadId
+ return r
+}
+
+func (r ApiUploadPartRequest) UploadPartRequest(uploadPartRequest UploadPartRequest) ApiUploadPartRequest {
+ r.uploadPartRequest = &uploadPartRequest
+ return r
+}
+
+// Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically.
+func (r ApiUploadPartRequest) ContentLength(contentLength int32) ApiUploadPartRequest {
+ r.contentLength = &contentLength
+ return r
+}
+
+func (r ApiUploadPartRequest) ContentMD5(contentMD5 string) ApiUploadPartRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+// Specifies the algorithm to use to when encrypting the object (AES256).
+func (r ApiUploadPartRequest) XAmzServerSideEncryptionCustomerAlgorithm(xAmzServerSideEncryptionCustomerAlgorithm string) ApiUploadPartRequest {
+ r.xAmzServerSideEncryptionCustomerAlgorithm = &xAmzServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+// Specifies the customer-provided encryption key for IONOS Object Storage to use in encrypting data. This value is used to store the object and then it is discarded; IONOS Object Storage does not store the encryption key. The key must be appropriate for use with the algorithm specified in the `x-amz-server-side-encryption-customer-algorithm header`. This must be the same encryption key specified in the initiate multipart upload request.
+func (r ApiUploadPartRequest) XAmzServerSideEncryptionCustomerKey(xAmzServerSideEncryptionCustomerKey string) ApiUploadPartRequest {
+ r.xAmzServerSideEncryptionCustomerKey = &xAmzServerSideEncryptionCustomerKey
+ return r
+}
+
+// Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. IONOS Object Storage uses this header for a message integrity check to ensure that the encryption key was transmitted without error.
+func (r ApiUploadPartRequest) XAmzServerSideEncryptionCustomerKeyMD5(xAmzServerSideEncryptionCustomerKeyMD5 string) ApiUploadPartRequest {
+ r.xAmzServerSideEncryptionCustomerKeyMD5 = &xAmzServerSideEncryptionCustomerKeyMD5
+ return r
+}
+
+func (r ApiUploadPartRequest) Execute() (map[string]interface{}, *shared.APIResponse, error) {
+ return r.ApiService.UploadPartExecute(r)
+}
+
+/*
+UploadPart UploadPart
+
+Uploads a part in a multipart upload.
In this operation, you provide part data in your request. However, you have an option to specify your existing IONOS Object Storage object as a data source for the part you are uploading. To upload a part from an existing object, you use the `UploadPartCopy` operation.
You must initiate a multipart upload (see `CreateMultipartUpload`) before you can upload any part. In response to your initiate request, IONOS Object Storage returns an upload ID, a unique identifier, that you must include in your upload part request.
Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies a part and also defines its position within the object being created. If you upload a new part using the same part number that was used with a previous part, the previously uploaded part is overwritten. Each part must be at least 5 MB in size, except the last part. There is no size limit on the last part of your multipart upload.
To ensure that data is not corrupted when traversing the network, specify the `Content-MD5` header in the upload part request. IONOS Object Storage checks the part data against the provided MD5 value. If they do not match, IONOS Object Storage returns an error.
If the upload request is signed with Signature Version 4, then IONOS Object Storage uses the `x-amz-content-sha256` header as a checksum instead of `Content-MD5`.
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, IONOS Object Storage frees up the parts storage and stops charging you for the parts storage.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Object key for which the multipart upload was initiated.
+ @return ApiUploadPartRequest
+*/
+func (a *UploadsApiService) UploadPart(ctx context.Context, bucket string, key string) ApiUploadPartRequest {
+ return ApiUploadPartRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return map[string]interface{}
+func (a *UploadsApiService) UploadPartExecute(r ApiUploadPartRequest) (map[string]interface{}, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue map[string]interface{}
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsApiService.UploadPart")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?uploadId"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+ if r.partNumber == nil {
+ return localVarReturnValue, nil, reportError("partNumber is required and must be specified")
+ }
+ if r.uploadId == nil {
+ return localVarReturnValue, nil, reportError("uploadId is required and must be specified")
+ }
+ if r.uploadPartRequest == nil {
+ return localVarReturnValue, nil, reportError("uploadPartRequest is required and must be specified")
+ }
+
+ parameterAddToHeaderOrQuery(localVarQueryParams, "partNumber", r.partNumber, "")
+ parameterAddToHeaderOrQuery(localVarQueryParams, "uploadId", r.uploadId, "")
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentLength != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Length", r.contentLength, "")
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-algorithm", r.xAmzServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKey != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key", r.xAmzServerSideEncryptionCustomerKey, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerKeyMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-key-MD5", r.xAmzServerSideEncryptionCustomerKeyMD5, "")
+ }
+ // body params
+ localVarPostBody = r.uploadPartRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "UploadPart",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiUploadPartCopyRequest struct {
+ ctx context.Context
+ ApiService *UploadsApiService
+ bucket string
+ xAmzCopySource *string
+ key string
+ partNumber *int32
+ uploadId *string
+ xAmzCopySourceIfMatch *string
+ xAmzCopySourceIfModifiedSince *time.Time
+ xAmzCopySourceIfNoneMatch *string
+ xAmzCopySourceIfUnmodifiedSince *time.Time
+ xAmzCopySourceRange *string
+ xAmzServerSideEncryptionCustomerAlgorithm *string
+}
+
+// <p>Specifies the source object for the copy operation. </p>
+func (r ApiUploadPartCopyRequest) XAmzCopySource(xAmzCopySource string) ApiUploadPartCopyRequest {
+ r.xAmzCopySource = &xAmzCopySource
+ return r
+}
+
+// Part number of part being copied. This is a positive integer between 1 and 10,000.
+func (r ApiUploadPartCopyRequest) PartNumber(partNumber int32) ApiUploadPartCopyRequest {
+ r.partNumber = &partNumber
+ return r
+}
+
+// Upload ID identifying the multipart upload whose part is being copied.
+func (r ApiUploadPartCopyRequest) UploadId(uploadId string) ApiUploadPartCopyRequest {
+ r.uploadId = &uploadId
+ return r
+}
+
+// Copies the object if its entity tag (ETag) matches the specified tag.
+func (r ApiUploadPartCopyRequest) XAmzCopySourceIfMatch(xAmzCopySourceIfMatch string) ApiUploadPartCopyRequest {
+ r.xAmzCopySourceIfMatch = &xAmzCopySourceIfMatch
+ return r
+}
+
+// Copies the object if it has been modified since the specified time.
+func (r ApiUploadPartCopyRequest) XAmzCopySourceIfModifiedSince(xAmzCopySourceIfModifiedSince time.Time) ApiUploadPartCopyRequest {
+ r.xAmzCopySourceIfModifiedSince = &xAmzCopySourceIfModifiedSince
+ return r
+}
+
+// Copies the object if its entity tag (ETag) is different than the specified ETag.
+func (r ApiUploadPartCopyRequest) XAmzCopySourceIfNoneMatch(xAmzCopySourceIfNoneMatch string) ApiUploadPartCopyRequest {
+ r.xAmzCopySourceIfNoneMatch = &xAmzCopySourceIfNoneMatch
+ return r
+}
+
+// Copies the object if it hasn't been modified since the specified time.
+func (r ApiUploadPartCopyRequest) XAmzCopySourceIfUnmodifiedSince(xAmzCopySourceIfUnmodifiedSince time.Time) ApiUploadPartCopyRequest {
+ r.xAmzCopySourceIfUnmodifiedSince = &xAmzCopySourceIfUnmodifiedSince
+ return r
+}
+
+// The range of bytes to copy from the source object. The range value must use the form bytes=first-last, where the first and last are the zero-based byte offsets to copy. For example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You can copy a range only if the source object is greater than 5 MB.
+func (r ApiUploadPartCopyRequest) XAmzCopySourceRange(xAmzCopySourceRange string) ApiUploadPartCopyRequest {
+ r.xAmzCopySourceRange = &xAmzCopySourceRange
+ return r
+}
+
+// Specifies the algorithm to use to when encrypting the object (AES256).
+func (r ApiUploadPartCopyRequest) XAmzServerSideEncryptionCustomerAlgorithm(xAmzServerSideEncryptionCustomerAlgorithm string) ApiUploadPartCopyRequest {
+ r.xAmzServerSideEncryptionCustomerAlgorithm = &xAmzServerSideEncryptionCustomerAlgorithm
+ return r
+}
+
+func (r ApiUploadPartCopyRequest) Execute() (*UploadPartCopyOutput, *shared.APIResponse, error) {
+ return r.ApiService.UploadPartCopyExecute(r)
+}
+
+/*
+UploadPartCopy UploadPartCopy
+
+Uploads a part by copying data from an existing object as data source. You specify the data source by adding the request header `x-amz-copy-source` in your request and a byte range by adding the request header `x-amz-copy-source-range` in your request.
The minimum allowable part size for a multipart upload is 5 MB.
Instead of using an existing object as part data, you might use the `UploadPart` operation and provide data in your request.
You must initiate a multipart upload before you can upload any part. In response to your initiate request. IONOS Object Storage returns a unique identifier, the upload ID, that you must include in your upload part request.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @param key Object key for which the multipart upload was initiated.
+ @return ApiUploadPartCopyRequest
+*/
+func (a *UploadsApiService) UploadPartCopy(ctx context.Context, bucket string, key string) ApiUploadPartCopyRequest {
+ return ApiUploadPartCopyRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ key: key,
+ }
+}
+
+// Execute executes the request
+//
+// @return UploadPartCopyOutput
+func (a *UploadsApiService) UploadPartCopyExecute(r ApiUploadPartCopyRequest) (*UploadPartCopyOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *UploadPartCopyOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UploadsApiService.UploadPartCopy")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}/{Key}?x-amz-copy-source&partNumber&uploadId"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+ localVarPath = strings.Replace(localVarPath, "{"+"Key"+"}", parameterValueToString(r.key, "key"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.xAmzCopySource == nil {
+ return localVarReturnValue, nil, reportError("xAmzCopySource is required and must be specified")
+ }
+ if shared.Strlen(r.key) < 1 {
+ return localVarReturnValue, nil, reportError("key must have at least 1 elements")
+ }
+ if r.partNumber == nil {
+ return localVarReturnValue, nil, reportError("partNumber is required and must be specified")
+ }
+ if r.uploadId == nil {
+ return localVarReturnValue, nil, reportError("uploadId is required and must be specified")
+ }
+
+ parameterAddToHeaderOrQuery(localVarQueryParams, "partNumber", r.partNumber, "")
+ parameterAddToHeaderOrQuery(localVarQueryParams, "uploadId", r.uploadId, "")
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source", r.xAmzCopySource, "")
+ if r.xAmzCopySourceIfMatch != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-if-match", r.xAmzCopySourceIfMatch, "")
+ }
+ if r.xAmzCopySourceIfModifiedSince != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-if-modified-since", r.xAmzCopySourceIfModifiedSince, "")
+ }
+ if r.xAmzCopySourceIfNoneMatch != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-if-none-match", r.xAmzCopySourceIfNoneMatch, "")
+ }
+ if r.xAmzCopySourceIfUnmodifiedSince != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-if-unmodified-since", r.xAmzCopySourceIfUnmodifiedSince, "")
+ }
+ if r.xAmzCopySourceRange != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-copy-source-range", r.xAmzCopySourceRange, "")
+ }
+ if r.xAmzServerSideEncryptionCustomerAlgorithm != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "x-amz-server-side-encryption-customer-algorithm", r.xAmzServerSideEncryptionCustomerAlgorithm, "")
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "UploadPartCopy",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_versioning.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_versioning.go
new file mode 100644
index 0000000000..f062d2851e
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_versioning.go
@@ -0,0 +1,344 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VersioningApiService VersioningApi service
+type VersioningApiService service
+
+type ApiGetBucketVersioningRequest struct {
+ ctx context.Context
+ ApiService *VersioningApiService
+ bucket string
+}
+
+func (r ApiGetBucketVersioningRequest) Execute() (*GetBucketVersioningOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketVersioningExecute(r)
+}
+
+/*
+GetBucketVersioning GetBucketVersioning
+
+Returns the versioning state of a bucket.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:GetBucketVersioning` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-expected-bucket-owner` header isn't supported.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketVersioningRequest
+*/
+func (a *VersioningApiService) GetBucketVersioning(ctx context.Context, bucket string) ApiGetBucketVersioningRequest {
+ return ApiGetBucketVersioningRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetBucketVersioningOutput
+func (a *VersioningApiService) GetBucketVersioningExecute(r ApiGetBucketVersioningRequest) (*GetBucketVersioningOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetBucketVersioningOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersioningApiService.GetBucketVersioning")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?versioning"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketVersioning",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutBucketVersioningRequest struct {
+ ctx context.Context
+ ApiService *VersioningApiService
+ bucket string
+ putBucketVersioningRequest *PutBucketVersioningRequest
+ contentMD5 *string
+}
+
+func (r ApiPutBucketVersioningRequest) PutBucketVersioningRequest(putBucketVersioningRequest PutBucketVersioningRequest) ApiPutBucketVersioningRequest {
+ r.putBucketVersioningRequest = &putBucketVersioningRequest
+ return r
+}
+
+func (r ApiPutBucketVersioningRequest) ContentMD5(contentMD5 string) ApiPutBucketVersioningRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutBucketVersioningRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutBucketVersioningExecute(r)
+}
+
+/*
+PutBucketVersioning PutBucketVersioning
+
+Configures the versioning state of an Object Storage bucket. Versioning allows keeping multiple variants of an object in the same bucket.
+
+The versioning state can be one of the following:
+- `Enabled`: Activates versioning for the bucket. All objects added receive a unique version ID.
+- `Suspended`: Deactivates versioning. New objects get a null version ID. However, previously created version IDs persist.
+
+#### Lifecycle configuration for versioned buckets
+With Versioning, a bucket maintains one current version of an object and potentially multiple noncurrent (previous) versions,
+requiring additional management to handle noncurrent object version deletions using a Lifecycle Configuration.
+
+#### Permissions
+You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission
+to perform the `s3:PutBucketVersioning` operation using [Bucket Policy](#tag/Policy/operation/PutBucketPolicy).
+
+#### S3 API Compatibility
+- The `x-amz-mfa` header is not supported.
+- The `MfaDelete` setting is ignored in the PUT request.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutBucketVersioningRequest
+*/
+func (a *VersioningApiService) PutBucketVersioning(ctx context.Context, bucket string) ApiPutBucketVersioningRequest {
+ return ApiPutBucketVersioningRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *VersioningApiService) PutBucketVersioningExecute(r ApiPutBucketVersioningRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersioningApiService.PutBucketVersioning")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?versioning"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.putBucketVersioningRequest == nil {
+ return nil, reportError("putBucketVersioningRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.putBucketVersioningRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutBucketVersioning",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ if localVarHTTPResponse.StatusCode == 400 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ return localVarAPIResponse, newErr
+ }
+ if localVarHTTPResponse.StatusCode == 409 {
+ var v Error
+ err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr.SetError(err.Error())
+ return localVarAPIResponse, newErr
+ }
+ newErr.SetModel(v)
+ }
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_versions.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_versions.go
new file mode 100644
index 0000000000..24f119f13c
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_versions.go
@@ -0,0 +1,249 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// VersionsApiService VersionsApi service
+type VersionsApiService service
+
+type ApiListObjectVersionsRequest struct {
+ ctx context.Context
+ ApiService *VersionsApiService
+ bucket string
+ delimiter *string
+ encodingType *string
+ keyMarker *string
+ maxKeys *int32
+ prefix *string
+ versionIdMarker *string
+ maxKeys2 *string
+ keyMarker2 *string
+ versionIdMarker2 *string
+}
+
+// A delimiter is a character that you specify to group keys. All keys that contain the same string between the `prefix` and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response.
+func (r ApiListObjectVersionsRequest) Delimiter(delimiter string) ApiListObjectVersionsRequest {
+ r.delimiter = &delimiter
+ return r
+}
+
+func (r ApiListObjectVersionsRequest) EncodingType(encodingType string) ApiListObjectVersionsRequest {
+ r.encodingType = &encodingType
+ return r
+}
+
+// Specifies the key to start with when listing objects in a bucket.
+func (r ApiListObjectVersionsRequest) KeyMarker(keyMarker string) ApiListObjectVersionsRequest {
+ r.keyMarker = &keyMarker
+ return r
+}
+
+// Sets the maximum number of keys returned in the response. By default the operation returns up to 1,000 key names. The response might contain fewer keys but will never contain more. If additional keys satisfy the search criteria, but were not returned because max-keys was exceeded, the response contains <isTruncated>true</isTruncated>. To return the additional keys, see key-marker and version-id-marker.
+func (r ApiListObjectVersionsRequest) MaxKeys(maxKeys int32) ApiListObjectVersionsRequest {
+ r.maxKeys = &maxKeys
+ return r
+}
+
+// Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes.
+func (r ApiListObjectVersionsRequest) Prefix(prefix string) ApiListObjectVersionsRequest {
+ r.prefix = &prefix
+ return r
+}
+
+// Specifies the object version you want to start listing from.
+func (r ApiListObjectVersionsRequest) VersionIdMarker(versionIdMarker string) ApiListObjectVersionsRequest {
+ r.versionIdMarker = &versionIdMarker
+ return r
+}
+
+// Pagination limit
+func (r ApiListObjectVersionsRequest) MaxKeys2(maxKeys2 string) ApiListObjectVersionsRequest {
+ r.maxKeys2 = &maxKeys2
+ return r
+}
+
+// Pagination token
+func (r ApiListObjectVersionsRequest) KeyMarker2(keyMarker2 string) ApiListObjectVersionsRequest {
+ r.keyMarker2 = &keyMarker2
+ return r
+}
+
+// Pagination token
+func (r ApiListObjectVersionsRequest) VersionIdMarker2(versionIdMarker2 string) ApiListObjectVersionsRequest {
+ r.versionIdMarker2 = &versionIdMarker2
+ return r
+}
+
+func (r ApiListObjectVersionsRequest) Execute() (*ListObjectVersionsOutput, *shared.APIResponse, error) {
+ return r.ApiService.ListObjectVersionsExecute(r)
+}
+
+/*
+ListObjectVersions ListObjectVersions
+
+Returns metadata about all versions of the objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions.
To use this operation, you must have permissions to perform the `ListBucketVersions` operation. Be aware of the name difference.
A 200 OK response can contain valid or invalid XML. Make sure to design your application to parse the contents of the response and handle it appropriately.
To use this operation, you must have READ access to the bucket.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiListObjectVersionsRequest
+*/
+func (a *VersionsApiService) ListObjectVersions(ctx context.Context, bucket string) ApiListObjectVersionsRequest {
+ return ApiListObjectVersionsRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return ListObjectVersionsOutput
+func (a *VersionsApiService) ListObjectVersionsExecute(r ApiListObjectVersionsRequest) (*ListObjectVersionsOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *ListObjectVersionsOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersionsApiService.ListObjectVersions")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?versions"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ if r.delimiter != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "delimiter", r.delimiter, "")
+ }
+ if r.encodingType != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "encoding-type", r.encodingType, "")
+ }
+ if r.keyMarker != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "key-marker", r.keyMarker, "")
+ }
+ if r.maxKeys != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "max-keys", r.maxKeys, "")
+ }
+ if r.prefix != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", r.prefix, "")
+ }
+ if r.versionIdMarker != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "version-id-marker", r.versionIdMarker, "")
+ }
+ if r.maxKeys2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "MaxKeys", r.maxKeys2, "")
+ }
+ if r.keyMarker2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "KeyMarker", r.keyMarker2, "")
+ }
+ if r.versionIdMarker2 != nil {
+ parameterAddToHeaderOrQuery(localVarQueryParams, "VersionIdMarker", r.versionIdMarker2, "")
+ }
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "ListObjectVersions",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_website.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_website.go
new file mode 100644
index 0000000000..0943c8fbcc
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/api_website.go
@@ -0,0 +1,424 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "io"
+ "net/http"
+ "net/url"
+ "strings"
+)
+
+// WebsiteApiService WebsiteApi service
+type WebsiteApiService service
+
+type ApiDeleteBucketWebsiteRequest struct {
+ ctx context.Context
+ ApiService *WebsiteApiService
+ bucket string
+}
+
+func (r ApiDeleteBucketWebsiteRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.DeleteBucketWebsiteExecute(r)
+}
+
+/*
+DeleteBucketWebsite DeleteBucketWebsite
+
+This operation removes the website configuration for a bucket. IONOS Object Storage returns a `200 OK` response upon successfully deleting a website configuration on the specified bucket. You will get a `200 OK` response if the website configuration you are trying to delete does not exist on the bucket. IONOS Object Storage returns a `404` response if the bucket specified in the request does not exist.
This DELETE operation requires the `DeleteBucketWebsite` permission. By default, only the bucket owner can delete the website configuration attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration by writing a bucket policy granting them the `DeleteBucketWebsite` permission.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiDeleteBucketWebsiteRequest
+*/
+func (a *WebsiteApiService) DeleteBucketWebsite(ctx context.Context, bucket string) ApiDeleteBucketWebsiteRequest {
+ return ApiDeleteBucketWebsiteRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *WebsiteApiService) DeleteBucketWebsiteExecute(r ApiDeleteBucketWebsiteRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodDelete
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebsiteApiService.DeleteBucketWebsite")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?website"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "DeleteBucketWebsite",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
+
+type ApiGetBucketWebsiteRequest struct {
+ ctx context.Context
+ ApiService *WebsiteApiService
+ bucket string
+}
+
+func (r ApiGetBucketWebsiteRequest) Execute() (*GetBucketWebsiteOutput, *shared.APIResponse, error) {
+ return r.ApiService.GetBucketWebsiteExecute(r)
+}
+
+/*
+GetBucketWebsite GetBucketWebsite
+
+Returns the website configuration for a bucket.
This GET operation requires the `GetBucketWebsite` permission. By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other users to read the website configuration by writing a bucket policy granting them the `GetBucketWebsite` permission.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiGetBucketWebsiteRequest
+*/
+func (a *WebsiteApiService) GetBucketWebsite(ctx context.Context, bucket string) ApiGetBucketWebsiteRequest {
+ return ApiGetBucketWebsiteRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+//
+// @return GetBucketWebsiteOutput
+func (a *WebsiteApiService) GetBucketWebsiteExecute(r ApiGetBucketWebsiteRequest) (*GetBucketWebsiteOutput, *shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodGet
+ localVarPostBody interface{}
+ formFiles []formFile
+ localVarReturnValue *GetBucketWebsiteOutput
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebsiteApiService.GetBucketWebsite")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return localVarReturnValue, nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?website"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return localVarReturnValue, nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return localVarReturnValue, nil, reportError("bucket must have less than 63 elements")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{"application/xml"}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "GetBucketWebsite",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarReturnValue, localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
+ if err != nil {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(err.Error())
+ return localVarReturnValue, localVarAPIResponse, newErr
+ }
+
+ return localVarReturnValue, localVarAPIResponse, nil
+}
+
+type ApiPutBucketWebsiteRequest struct {
+ ctx context.Context
+ ApiService *WebsiteApiService
+ bucket string
+ putBucketWebsiteRequest *PutBucketWebsiteRequest
+ contentMD5 *string
+}
+
+func (r ApiPutBucketWebsiteRequest) PutBucketWebsiteRequest(putBucketWebsiteRequest PutBucketWebsiteRequest) ApiPutBucketWebsiteRequest {
+ r.putBucketWebsiteRequest = &putBucketWebsiteRequest
+ return r
+}
+
+func (r ApiPutBucketWebsiteRequest) ContentMD5(contentMD5 string) ApiPutBucketWebsiteRequest {
+ r.contentMD5 = &contentMD5
+ return r
+}
+
+func (r ApiPutBucketWebsiteRequest) Execute() (*shared.APIResponse, error) {
+ return r.ApiService.PutBucketWebsiteExecute(r)
+}
+
+/*
+PutBucketWebsite PutBucketWebsite
+
+Sets the configuration of the website that is specified in the `website` subresource. To configure a bucket as a website, you can add this subresource on the bucket with website configuration information such as the file name of the index document and any redirect rules.
This PUT operation requires the `PutBucketWebsite` permission. By default, only the bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the website configuration by writing a bucket policy that grants them the `PutBucketWebsite` permission.
To redirect all website requests sent to the bucket's website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don't need to provide index document name for the bucket.
-
`WebsiteConfiguration`
-
`RedirectAllRequestsTo`
-
`HostName`
-
`Protocol`
If you want granular control over redirects, you can use the following elements to add routing rules that describe conditions for redirecting requests and information about the redirect destination. In this case, the website configuration must provide an index document for the bucket, because some requests might not be redirected.
+
+ @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
+ @param bucket
+ @return ApiPutBucketWebsiteRequest
+*/
+func (a *WebsiteApiService) PutBucketWebsite(ctx context.Context, bucket string) ApiPutBucketWebsiteRequest {
+ return ApiPutBucketWebsiteRequest{
+ ApiService: a,
+ ctx: ctx,
+ bucket: bucket,
+ }
+}
+
+// Execute executes the request
+func (a *WebsiteApiService) PutBucketWebsiteExecute(r ApiPutBucketWebsiteRequest) (*shared.APIResponse, error) {
+ var (
+ localVarHTTPMethod = http.MethodPut
+ localVarPostBody interface{}
+ formFiles []formFile
+ )
+
+ localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebsiteApiService.PutBucketWebsite")
+ if err != nil {
+ gerr := shared.GenericOpenAPIError{}
+ gerr.SetError(err.Error())
+ return nil, gerr
+ }
+
+ localVarPath := localBasePath + "/{Bucket}?website"
+ localVarPath = strings.Replace(localVarPath, "{"+"Bucket"+"}", parameterValueToString(r.bucket, "bucket"), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+ if shared.Strlen(r.bucket) < 3 {
+ return nil, reportError("bucket must have at least 3 elements")
+ }
+ if shared.Strlen(r.bucket) > 63 {
+ return nil, reportError("bucket must have less than 63 elements")
+ }
+ if r.putBucketWebsiteRequest == nil {
+ return nil, reportError("putBucketWebsiteRequest is required and must be specified")
+ }
+
+ // to determine the Content-Type header
+ localVarHTTPContentTypes := []string{"application/xml"}
+
+ // set Content-Type header
+ localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
+ if localVarHTTPContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHTTPContentType
+ }
+
+ // to determine the Accept header
+ localVarHTTPHeaderAccepts := []string{}
+
+ // set Accept header
+ localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
+ if localVarHTTPHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
+ }
+ if r.contentMD5 != nil {
+ parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-MD5", r.contentMD5, "")
+ }
+ // body params
+ localVarPostBody = r.putBucketWebsiteRequest
+ if r.ctx != nil {
+ // API Key Authentication
+ if auth, ok := r.ctx.Value(shared.ContextAPIKeys).(map[string]shared.APIKey); ok {
+ if apiKey, ok := auth["hmac"]; ok {
+ var key string
+ if apiKey.Prefix != "" {
+ key = apiKey.Prefix + " " + apiKey.Key
+ } else {
+ key = apiKey.Key
+ }
+ localVarHeaderParams["Authorization"] = key
+ }
+ }
+ }
+ req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
+ if err != nil {
+ return nil, err
+ }
+
+ localVarHTTPResponse, httpRequestTime, err := a.client.callAPI(req)
+ localVarAPIResponse := &shared.APIResponse{
+ Response: localVarHTTPResponse,
+ Method: localVarHTTPMethod,
+ RequestTime: httpRequestTime,
+ RequestURL: localVarPath,
+ Operation: "PutBucketWebsite",
+ }
+ if err != nil || localVarHTTPResponse == nil {
+ return localVarAPIResponse, err
+ }
+
+ localVarBody, err := io.ReadAll(localVarHTTPResponse.Body)
+ localVarHTTPResponse.Body.Close()
+ localVarAPIResponse.Payload = localVarBody
+ localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody))
+ if err != nil {
+ return localVarAPIResponse, err
+ }
+
+ if localVarHTTPResponse.StatusCode >= 300 {
+ newErr := shared.GenericOpenAPIError{}
+ newErr.SetStatusCode(localVarHTTPResponse.StatusCode)
+ newErr.SetBody(localVarBody)
+ newErr.SetError(fmt.Sprintf("%s: %s", localVarHTTPResponse.Status, string(localVarBody)))
+ return localVarAPIResponse, newErr
+ }
+
+ return localVarAPIResponse, nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/client.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/client.go
new file mode 100644
index 0000000000..980479bb2c
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/client.go
@@ -0,0 +1,966 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "context"
+ "crypto/sha256"
+ "crypto/tls"
+ "crypto/x509"
+ "encoding/hex"
+ "encoding/json"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "mime/multipart"
+ "net"
+ "net/http"
+ "net/http/httputil"
+ "net/url"
+ "os"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "strconv"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+)
+
+var (
+ JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`)
+ XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`)
+ queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
+ queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
+)
+
+const (
+ Version = "products/objectstorage/v2.0.3"
+ DefaultIonosServerUrl = "https://s3.eu-central-3.ionoscloud.com"
+ DefaultIonosBasePath = ""
+)
+
+// APIClient manages communication with the IONOS Object Storage API for contract-owned buckets API v2.0.2
+// In most cases there should be only one, shared, APIClient.
+type APIClient struct {
+ cfg *shared.Configuration
+ common service // Reuse a single struct instead of allocating one for each service on the heap.
+
+ // API Services
+
+ BucketsApi *BucketsApiService
+
+ CORSApi *CORSApiService
+
+ EncryptionApi *EncryptionApiService
+
+ LifecycleApi *LifecycleApiService
+
+ ObjectLockApi *ObjectLockApiService
+
+ ObjectsApi *ObjectsApiService
+
+ PolicyApi *PolicyApiService
+
+ PublicAccessBlockApi *PublicAccessBlockApiService
+
+ ReplicationApi *ReplicationApiService
+
+ TaggingApi *TaggingApiService
+
+ UploadsApi *UploadsApiService
+
+ VersioningApi *VersioningApiService
+
+ VersionsApi *VersionsApiService
+
+ WebsiteApi *WebsiteApiService
+}
+
+type service struct {
+ client *APIClient
+}
+
+func DeepCopy(cfg *shared.Configuration) (*shared.Configuration, error) {
+ if cfg == nil {
+ return nil, nil
+ }
+
+ data, err := json.Marshal(cfg)
+ if err != nil {
+ return nil, fmt.Errorf("failed to serialize configuration: %w", err)
+ }
+
+ clone := &shared.Configuration{}
+ err = json.Unmarshal(data, clone)
+ if err != nil {
+ return nil, fmt.Errorf("failed to deserialize configuration: %w", err)
+ }
+
+ return clone, nil
+}
+
+// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
+// optionally a custom http.Client to allow for advanced features such as caching.
+func NewAPIClient(cfg *shared.Configuration) *APIClient {
+ cfgCopy := &shared.Configuration{}
+ *cfgCopy = *cfg
+ if cfg.HTTPClient == nil || cfg.HTTPClient.Transport == nil {
+ var err error
+ cfgCopy, err = DeepCopy(cfg)
+ if err != nil {
+ if shared.SdkLogLevel.Satisfies(shared.Debug) {
+ shared.SdkLogger.Printf("Error creating deep copy of configuration: %v", err)
+ }
+
+ // shallow copy instead as a fallback
+ cfgCopy = &shared.Configuration{}
+ *cfgCopy = *cfg
+ }
+ }
+ if cfgCopy.UserAgent == "" {
+ cfgCopy.UserAgent = "sdk-go-bundle/products/objectstorage/v2.0.3"
+ }
+
+ if cfg.Middleware != nil {
+ cfgCopy.Middleware = cfg.Middleware
+ }
+
+ if cfg.MiddlewareWithError != nil {
+ cfgCopy.MiddlewareWithError = cfg.MiddlewareWithError
+ }
+
+ if cfg.ResponseMiddleware != nil {
+ cfgCopy.ResponseMiddleware = cfg.ResponseMiddleware
+ }
+
+ // Initialize default values in the copied configuration
+ if cfgCopy.HTTPClient == nil {
+ cfgCopy.HTTPClient = http.DefaultClient
+ }
+
+ if len(cfgCopy.Servers) == 0 {
+ cfgCopy.Servers = shared.ServerConfigurations{
+ {
+ URL: "https://s3.eu-central-3.ionoscloud.com",
+ Description: "The endpoint for the `eu-central-3` region (Berlin, Germany)",
+ },
+ {
+ URL: "https://s3.eu-central-4.ionoscloud.com",
+ Description: "The endpoint for the `eu-central-4` region (Frankfurt, Germany)",
+ },
+ {
+ URL: "https://s3.us-central-1.ionoscloud.com",
+ Description: "The endpoint for the `us-central-1` region (Lenexa, USA)",
+ },
+ }
+ } else {
+ // If the user has provided a custom server configuration, we need to ensure that the basepath is set
+ for i := range cfgCopy.Servers {
+ if cfgCopy.Servers[i].URL != "" && !strings.HasSuffix(cfgCopy.Servers[i].URL, DefaultIonosBasePath) {
+ cfgCopy.Servers[i].URL = fmt.Sprintf("%s%s", cfgCopy.Servers[i].URL, DefaultIonosBasePath)
+ }
+ }
+ }
+
+ // Enable certificate pinning if the environment variable is set
+ pkFingerprint := os.Getenv(shared.IonosPinnedCertEnvVar)
+ if pkFingerprint != "" {
+ httpTransport := &http.Transport{}
+ AddPinnedCert(httpTransport, pkFingerprint)
+ cfgCopy.HTTPClient.Transport = httpTransport
+ }
+
+ // Create and initialize the API client
+ c := &APIClient{}
+ c.cfg = cfgCopy
+ c.common.client = c
+
+ // API Services
+ c.BucketsApi = (*BucketsApiService)(&c.common)
+ c.CORSApi = (*CORSApiService)(&c.common)
+ c.EncryptionApi = (*EncryptionApiService)(&c.common)
+ c.LifecycleApi = (*LifecycleApiService)(&c.common)
+ c.ObjectLockApi = (*ObjectLockApiService)(&c.common)
+ c.ObjectsApi = (*ObjectsApiService)(&c.common)
+ c.PolicyApi = (*PolicyApiService)(&c.common)
+ c.PublicAccessBlockApi = (*PublicAccessBlockApiService)(&c.common)
+ c.ReplicationApi = (*ReplicationApiService)(&c.common)
+ c.TaggingApi = (*TaggingApiService)(&c.common)
+ c.UploadsApi = (*UploadsApiService)(&c.common)
+ c.VersioningApi = (*VersioningApiService)(&c.common)
+ c.VersionsApi = (*VersionsApiService)(&c.common)
+ c.WebsiteApi = (*WebsiteApiService)(&c.common)
+
+ return c
+}
+
+// AddPinnedCert - enables pinning of the sha256 public fingerprint to the http client's transport
+func AddPinnedCert(transport *http.Transport, pkFingerprint string) {
+ if pkFingerprint != "" {
+ transport.DialTLSContext = addPinnedCertVerification([]byte(pkFingerprint), new(tls.Config))
+ }
+}
+
+// TLSDial can be assigned to a http.Transport's DialTLS field.
+type TLSDial func(ctx context.Context, network, addr string) (net.Conn, error)
+
+// addPinnedCertVerification returns a TLSDial function which checks that
+// the remote server provides a certificate whose SHA256 fingerprint matches
+// the provided value.
+//
+// The returned dialer function can be plugged into a http.Transport's DialTLS
+// field to allow for certificate pinning.
+func addPinnedCertVerification(fingerprint []byte, tlsConfig *tls.Config) TLSDial {
+ return func(ctx context.Context, network, addr string) (net.Conn, error) {
+ //fingerprints can be added with ':', we need to trim
+ fingerprint = bytes.ReplaceAll(fingerprint, []byte(":"), []byte(""))
+ fingerprint = bytes.ReplaceAll(fingerprint, []byte(" "), []byte(""))
+ //we are manually checking a certificate, so we need to enable insecure
+ tlsConfig.InsecureSkipVerify = true
+
+ // Dial the connection to get certificates to check
+ conn, err := tls.Dial(network, addr, tlsConfig)
+ if err != nil {
+ return nil, err
+ }
+
+ if err := verifyPinnedCert(fingerprint, conn.ConnectionState().PeerCertificates); err != nil {
+ _ = conn.Close()
+ return nil, err
+ }
+
+ return conn, nil
+ }
+}
+
+// verifyPinnedCert iterates the list of peer certificates and attempts to
+// locate a certificate that is not a CA and whose public key fingerprint matches pkFingerprint.
+func verifyPinnedCert(pkFingerprint []byte, peerCerts []*x509.Certificate) error {
+ for _, cert := range peerCerts {
+ fingerprint := sha256.Sum256(cert.Raw)
+
+ var bytesFingerPrint = make([]byte, hex.EncodedLen(len(fingerprint[:])))
+ hex.Encode(bytesFingerPrint, fingerprint[:])
+
+ // we have a match, and it's not an authority certificate
+ if cert.IsCA == false && bytes.EqualFold(bytesFingerPrint, pkFingerprint) {
+ return nil
+ }
+ }
+
+ return fmt.Errorf("remote server presented a certificate which does not match the provided fingerprint")
+}
+
+func atoi(in string) (int, error) {
+ return strconv.Atoi(in)
+}
+
+// selectHeaderContentType select a content type from the available list.
+func selectHeaderContentType(contentTypes []string) string {
+ if len(contentTypes) == 0 {
+ return ""
+ }
+ if contains(contentTypes, "application/json") {
+ return "application/json"
+ }
+ return contentTypes[0] // use the first content type specified in 'consumes'
+}
+
+// selectHeaderAccept join all accept types and return
+func selectHeaderAccept(accepts []string) string {
+ if len(accepts) == 0 {
+ return ""
+ }
+
+ if contains(accepts, "application/json") {
+ return "application/json"
+ }
+
+ return strings.Join(accepts, ",")
+}
+
+// contains is a case insensitive match, finding needle in a haystack
+func contains(haystack []string, needle string) bool {
+ for _, a := range haystack {
+ if strings.EqualFold(a, needle) {
+ return true
+ }
+ }
+ return false
+}
+
+// Verify optional parameters are of the correct type.
+func typeCheckParameter(obj interface{}, expected string, name string) error {
+ // Make sure there is an object.
+ if obj == nil {
+ return nil
+ }
+
+ // Check the type is as expected.
+ if reflect.TypeOf(obj).String() != expected {
+ return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
+ }
+ return nil
+}
+
+func parameterValueToString(obj interface{}, key string) string {
+ if reflect.TypeOf(obj).Kind() != reflect.Ptr {
+ return fmt.Sprintf("%v", obj)
+ }
+ var param, ok = obj.(MappedNullable)
+ if !ok {
+ return ""
+ }
+ dataMap, err := param.ToMap()
+ if err != nil {
+ return ""
+ }
+ return fmt.Sprintf("%v", dataMap[key])
+}
+
+// parameterAddToHeaderOrQuery adds the provided object to the request header or url query
+// supporting deep object syntax
+func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) {
+ var v = reflect.ValueOf(obj)
+ var value = ""
+ if v == reflect.ValueOf(nil) {
+ value = "null"
+ } else {
+ switch v.Kind() {
+ case reflect.Invalid:
+ value = "invalid"
+
+ case reflect.Struct:
+ if t, ok := obj.(MappedNullable); ok {
+ dataMap, err := t.ToMap()
+ if err != nil {
+ return
+ }
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType)
+ return
+ }
+ if t, ok := obj.(time.Time); ok {
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), collectionType)
+ return
+ }
+ value = v.Type().String() + " value"
+ case reflect.Slice:
+ var indValue = reflect.ValueOf(obj)
+ if indValue == reflect.ValueOf(nil) {
+ return
+ }
+ var lenIndValue = indValue.Len()
+ for i := 0; i < lenIndValue; i++ {
+ var arrayValue = indValue.Index(i)
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType)
+ }
+ return
+
+ case reflect.Map:
+ var indValue = reflect.ValueOf(obj)
+ if indValue == reflect.ValueOf(nil) {
+ return
+ }
+ iter := indValue.MapRange()
+ for iter.Next() {
+ k, v := iter.Key(), iter.Value()
+ parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s-%s", keyPrefix, k.String()), v.Interface(), collectionType)
+ }
+ return
+
+ case reflect.Interface:
+ fallthrough
+ case reflect.Ptr:
+ parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType)
+ return
+
+ case reflect.Int, reflect.Int8, reflect.Int16,
+ reflect.Int32, reflect.Int64:
+ value = strconv.FormatInt(v.Int(), 10)
+ case reflect.Uint, reflect.Uint8, reflect.Uint16,
+ reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ value = strconv.FormatUint(v.Uint(), 10)
+ case reflect.Float32, reflect.Float64:
+ value = strconv.FormatFloat(v.Float(), 'g', -1, 32)
+ case reflect.Bool:
+ value = strconv.FormatBool(v.Bool())
+ case reflect.String:
+ value = v.String()
+ default:
+ value = v.Type().String() + " value"
+ }
+ }
+
+ switch valuesMap := headerOrQueryParams.(type) {
+ case url.Values:
+ if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" {
+ valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value)
+ } else {
+ valuesMap.Add(keyPrefix, value)
+ }
+ break
+ case map[string]string:
+ valuesMap[keyPrefix] = value
+ break
+ }
+}
+
+// helper for converting interface{} parameters to json strings
+func parameterToJson(obj interface{}) (string, error) {
+ jsonBuf, err := json.Marshal(obj)
+ if err != nil {
+ return "", err
+ }
+ return string(jsonBuf), err
+}
+
+// callAPI do the request.
+func (c *APIClient) callAPI(request *http.Request) (*http.Response, time.Duration, error) {
+ retryCount := 0
+
+ var resp *http.Response
+ var httpRequestTime time.Duration
+ var err error
+
+ for {
+
+ retryCount++
+
+ /* we need to clone the request with every retry time because Body closes after the request */
+ var clonedRequest *http.Request = request.Clone(request.Context())
+ if request.Body != nil {
+ clonedRequest.Body, err = request.GetBody()
+ if err != nil {
+ return nil, httpRequestTime, err
+ }
+ }
+
+ if shared.SdkLogLevel.Satisfies(shared.Debug) {
+ logRequest := request.Clone(request.Context())
+
+ // Remove the Authorization header if Debug is enabled (but not in Trace mode)
+ if !shared.SdkLogLevel.Satisfies(shared.Trace) {
+ logRequest.Header.Del("Authorization")
+ }
+
+ dump, err := httputil.DumpRequestOut(logRequest, true)
+ if err == nil {
+ shared.SdkLogger.Printf(" DumpRequestOut : %s\n", string(dump))
+ } else {
+ shared.SdkLogger.Printf(" DumpRequestOut err: %+v", err)
+ }
+ shared.SdkLogger.Printf("\n try no: %d\n", retryCount)
+ }
+
+ httpRequestStartTime := time.Now()
+ clonedRequest.Close = true
+ resp, err = c.cfg.HTTPClient.Do(clonedRequest)
+ httpRequestTime = time.Since(httpRequestStartTime)
+ if err != nil {
+ return resp, httpRequestTime, err
+ }
+
+ if shared.SdkLogLevel.Satisfies(shared.Trace) {
+ dump, err := httputil.DumpResponse(resp, true)
+ if err == nil {
+ shared.SdkLogger.Printf("\n DumpResponse : %s\n", string(dump))
+ } else {
+ shared.SdkLogger.Printf(" DumpResponse err %+v", err)
+ }
+ }
+
+ var backoffTime time.Duration
+
+ switch resp.StatusCode {
+ case http.StatusServiceUnavailable,
+ http.StatusGatewayTimeout,
+ http.StatusBadGateway:
+ if request.Method == http.MethodPost {
+ return resp, httpRequestTime, err
+ }
+ backoffTime = c.GetConfig().WaitTime
+
+ case http.StatusTooManyRequests:
+ if retryAfterSeconds := resp.Header.Get("Retry-After"); retryAfterSeconds != "" {
+ waitTime, err := time.ParseDuration(retryAfterSeconds + "s")
+ if err != nil {
+ return resp, httpRequestTime, err
+ }
+ backoffTime = waitTime
+ } else {
+ backoffTime = c.GetConfig().WaitTime
+ }
+ default:
+ return resp, httpRequestTime, err
+
+ }
+
+ if retryCount >= c.GetConfig().MaxRetries {
+ if shared.SdkLogLevel.Satisfies(shared.Debug) {
+ shared.SdkLogger.Printf(" Number of maximum retries exceeded (%d retries)\n", c.cfg.MaxRetries)
+ }
+ break
+ } else {
+ c.backOff(request.Context(), backoffTime)
+ }
+ }
+
+ return resp, httpRequestTime, err
+}
+
+func (c *APIClient) backOff(ctx context.Context, t time.Duration) {
+ if t > c.GetConfig().MaxWaitTime {
+ t = c.GetConfig().MaxWaitTime
+ }
+ if shared.SdkLogLevel.Satisfies(shared.Debug) {
+ shared.SdkLogger.Printf(" Sleeping %s before retrying request\n", t.String())
+ }
+ if t <= 0 {
+ return
+ }
+ timer := time.NewTimer(t)
+ defer timer.Stop()
+
+ select {
+ case <-ctx.Done():
+ case <-timer.C:
+ }
+}
+
+// Allow modification of underlying config for alternate implementations and testing
+// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
+func (c *APIClient) GetConfig() *shared.Configuration {
+ return c.cfg
+}
+
+type formFile struct {
+ fileBytes []byte
+ fileName string
+ formFileName string
+}
+
+// prepareRequest build the request
+func (c *APIClient) prepareRequest(
+ ctx context.Context,
+ path string, method string,
+ postBody interface{},
+ headerParams map[string]string,
+ queryParams url.Values,
+ formParams url.Values,
+ formFiles []formFile) (localVarRequest *http.Request, err error) {
+
+ var body *bytes.Buffer
+
+ // Detect postBody type and post.
+ if postBody != nil && !(reflect.ValueOf(postBody).Kind() == reflect.Ptr && reflect.ValueOf(postBody).IsNil()) {
+ contentType := headerParams["Content-Type"]
+ if contentType == "" {
+ contentType = detectContentType(postBody)
+ headerParams["Content-Type"] = contentType
+ }
+
+ body, err = setBody(postBody, contentType)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // add form parameters and file if available.
+ if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ w := multipart.NewWriter(body)
+
+ for k, v := range formParams {
+ for _, iv := range v {
+ if strings.HasPrefix(k, "@") { // file
+ err = addFile(w, k[1:], iv)
+ if err != nil {
+ return nil, err
+ }
+ } else { // form value
+ w.WriteField(k, iv)
+ }
+ }
+ }
+ for _, formFile := range formFiles {
+ if len(formFile.fileBytes) > 0 && formFile.fileName != "" {
+ w.Boundary()
+ part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName))
+ if err != nil {
+ return nil, err
+ }
+ _, err = part.Write(formFile.fileBytes)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+
+ // Set the Boundary in the Content-Type
+ headerParams["Content-Type"] = w.FormDataContentType()
+
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ w.Close()
+ }
+
+ if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
+ if body != nil {
+ return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
+ }
+ body = &bytes.Buffer{}
+ body.WriteString(formParams.Encode())
+ // Set Content-Length
+ headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
+ }
+
+ // Setup path and query parameters
+ url, err := url.Parse(path)
+ if err != nil {
+ return nil, err
+ }
+
+ // Override request host, if applicable
+ if c.cfg.Host != "" {
+ url.Host = c.cfg.Host
+ }
+
+ // Override request scheme, if applicable
+ if c.cfg.Scheme != "" {
+ url.Scheme = c.cfg.Scheme
+ }
+
+ // Adding Query Param
+ query := url.Query()
+ for k, v := range queryParams {
+ for _, iv := range v {
+ query.Add(k, iv)
+ }
+ }
+
+ // Encode the parameters.
+ url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string {
+ pieces := strings.Split(s, "=")
+ pieces[0] = queryDescape.Replace(pieces[0])
+ return strings.Join(pieces, "=")
+ })
+
+ // Generate a new request
+ if body != nil {
+ localVarRequest, err = http.NewRequest(method, url.String(), body)
+ } else {
+ localVarRequest, err = http.NewRequest(method, url.String(), nil)
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ // add header parameters, if any
+ if len(headerParams) > 0 {
+ headers := http.Header{}
+ for h, v := range headerParams {
+ headers[h] = []string{v}
+ }
+ localVarRequest.Header = headers
+ }
+
+ // Add the user agent to the request.
+ localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
+
+ if ctx != nil {
+ // add context to the request
+ localVarRequest = localVarRequest.WithContext(ctx)
+
+ // Walk through any authentication.
+
+ }
+
+ for header, value := range c.cfg.DefaultHeader {
+ localVarRequest.Header.Add(header, value)
+ }
+
+ if c.cfg.Middleware != nil {
+ c.cfg.Middleware(localVarRequest)
+ }
+
+ if c.cfg.MiddlewareWithError != nil {
+ err = c.cfg.MiddlewareWithError(localVarRequest)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return localVarRequest, nil
+}
+
+func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
+ if len(b) == 0 {
+ return nil
+ }
+ if s, ok := v.(*string); ok {
+ *s = string(b)
+ return nil
+ }
+ if f, ok := v.(*os.File); ok {
+ f, err = os.CreateTemp("", "HttpClientFile")
+ if err != nil {
+ return
+ }
+ _, err = f.Write(b)
+ if err != nil {
+ return
+ }
+ _, err = f.Seek(0, io.SeekStart)
+ return
+ }
+ if f, ok := v.(**os.File); ok {
+ *f, err = os.CreateTemp("", "HttpClientFile")
+ if err != nil {
+ return
+ }
+ _, err = (*f).Write(b)
+ if err != nil {
+ return
+ }
+ _, err = (*f).Seek(0, io.SeekStart)
+ return
+ }
+ if XmlCheck.MatchString(contentType) {
+ if err = xml.Unmarshal(b, v); err != nil {
+ return err
+ }
+ return nil
+ }
+ if JsonCheck.MatchString(contentType) {
+ if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
+ if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
+ if err = unmarshalObj.UnmarshalJSON(b); err != nil {
+ return err
+ }
+ } else {
+ return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
+ }
+ } else if err = json.Unmarshal(b, v); err != nil { // simple model
+ return err
+ }
+ return nil
+ }
+ return errors.New("undefined response type")
+}
+
+// Add a file to the multipart request
+func addFile(w *multipart.Writer, fieldName, path string) error {
+ file, err := os.Open(filepath.Clean(path))
+ if err != nil {
+ return err
+ }
+ err = file.Close()
+ if err != nil {
+ return err
+ }
+
+ part, err := w.CreateFormFile(fieldName, filepath.Base(path))
+ if err != nil {
+ return err
+ }
+ _, err = io.Copy(part, file)
+
+ return err
+}
+
+// Set request body from an interface{}
+func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
+ if bodyBuf == nil {
+ bodyBuf = &bytes.Buffer{}
+ }
+
+ if reader, ok := body.(io.Reader); ok {
+ _, err = bodyBuf.ReadFrom(reader)
+ } else if fp, ok := body.(*os.File); ok {
+ _, err = bodyBuf.ReadFrom(fp)
+ } else if b, ok := body.([]byte); ok {
+ _, err = bodyBuf.Write(b)
+ } else if s, ok := body.(string); ok {
+ _, err = bodyBuf.WriteString(s)
+ } else if s, ok := body.(*string); ok {
+ _, err = bodyBuf.WriteString(*s)
+ } else if JsonCheck.MatchString(contentType) {
+ err = json.NewEncoder(bodyBuf).Encode(body)
+ } else if XmlCheck.MatchString(contentType) {
+ var bs []byte
+ bs, err = xml.Marshal(body)
+ if err == nil {
+ bodyBuf.Write(bs)
+ }
+ }
+
+ if err != nil {
+ return nil, err
+ }
+
+ if bodyBuf.Len() == 0 {
+ err = fmt.Errorf("invalid body type %s\n", contentType)
+ return nil, err
+ }
+ return bodyBuf, nil
+}
+
+// detectContentType method is used to figure out `Request.Body` content type for request header
+func detectContentType(body interface{}) string {
+ contentType := "text/plain; charset=utf-8"
+ kind := reflect.TypeOf(body).Kind()
+
+ switch kind {
+ case reflect.Struct, reflect.Map, reflect.Ptr:
+ contentType = "application/json; charset=utf-8"
+ case reflect.String:
+ contentType = "text/plain; charset=utf-8"
+ default:
+ if b, ok := body.([]byte); ok {
+ contentType = http.DetectContentType(b)
+ } else if kind == reflect.Slice {
+ contentType = "application/json; charset=utf-8"
+ }
+ }
+
+ return contentType
+}
+
+// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
+type cacheControl map[string]string
+
+func parseCacheControl(headers http.Header) cacheControl {
+ cc := cacheControl{}
+ ccHeader := headers.Get("Cache-Control")
+ for _, part := range strings.Split(ccHeader, ",") {
+ part = strings.Trim(part, " ")
+ if part == "" {
+ continue
+ }
+ if strings.ContainsRune(part, '=') {
+ keyval := strings.Split(part, "=")
+ cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
+ } else {
+ cc[part] = ""
+ }
+ }
+ return cc
+}
+
+// CacheExpires helper function to determine remaining time before repeating a request.
+func CacheExpires(r *http.Response) time.Time {
+ // Figure out when the cache expires.
+ var expires time.Time
+ now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
+ if err != nil {
+ return time.Now()
+ }
+ respCacheControl := parseCacheControl(r.Header)
+
+ if maxAge, ok := respCacheControl["max-age"]; ok {
+ lifetime, err := time.ParseDuration(maxAge + "s")
+ if err != nil {
+ expires = now
+ } else {
+ expires = now.Add(lifetime)
+ }
+ } else {
+ expiresHeader := r.Header.Get("Expires")
+ if expiresHeader != "" {
+ expires, err = time.Parse(time.RFC1123, expiresHeader)
+ if err != nil {
+ expires = now
+ }
+ }
+ }
+ return expires
+}
+
+func strlen(s string) int {
+ return utf8.RuneCountInString(s)
+}
+
+// GenericOpenAPIError Provides access to the body, error and model on returned errors.
+type GenericOpenAPIError struct {
+ body []byte
+ error string
+ model interface{}
+ statusCode int
+}
+
+// Error returns non-empty string if there was an error.
+func (e GenericOpenAPIError) Error() string {
+ return e.error
+}
+
+// SetError sets the error string
+func (e *GenericOpenAPIError) SetError(error string) {
+ e.error = error
+}
+
+// Body returns the raw bytes of the response
+func (e GenericOpenAPIError) Body() []byte {
+ return e.body
+}
+
+// SetBody sets the raw body of the error
+func (e *GenericOpenAPIError) SetBody(body []byte) {
+ e.body = body
+}
+
+// Model returns the unpacked model of the error
+func (e GenericOpenAPIError) Model() interface{} {
+ return e.model
+}
+
+// SetModel sets the model of the error
+func (e *GenericOpenAPIError) SetModel(model interface{}) {
+ e.model = model
+}
+
+// StatusCode returns the status code of the error
+func (e GenericOpenAPIError) StatusCode() int {
+ return e.statusCode
+}
+
+// SetStatusCode sets the status code of the error
+func (e *GenericOpenAPIError) SetStatusCode(statusCode int) {
+ e.statusCode = statusCode
+}
+
+// format error message using title and detail when model implements rfc7807
+func formatErrorMessage(status string, v interface{}) string {
+ str := ""
+ metaValue := reflect.ValueOf(v).Elem()
+
+ if metaValue.Kind() == reflect.Struct {
+ field := metaValue.FieldByName("Title")
+ if field != (reflect.Value{}) {
+ str = fmt.Sprintf("%s", field.Interface())
+ }
+
+ field = metaValue.FieldByName("Detail")
+ if field != (reflect.Value{}) {
+ str = fmt.Sprintf("%s (%s)", str, field.Interface())
+ }
+ }
+
+ return strings.TrimSpace(fmt.Sprintf("%s %s", status, str))
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_abort_incomplete_multipart_upload.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_abort_incomplete_multipart_upload.go
new file mode 100644
index 0000000000..a8065abcfc
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_abort_incomplete_multipart_upload.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the AbortIncompleteMultipartUpload type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &AbortIncompleteMultipartUpload{}
+
+// AbortIncompleteMultipartUpload Specifies the days since the initiation of an incomplete multipart upload that IONOS Object Storage will wait before permanently removing all parts of the upload.
+type AbortIncompleteMultipartUpload struct {
+ XMLName xml.Name `xml:"AbortIncompleteMultipartUpload"`
+ // Specifies the number of days after which IONOS Object Storage aborts an incomplete multipart upload.
+ DaysAfterInitiation *int32 `json:"DaysAfterInitiation,omitempty" xml:"DaysAfterInitiation"`
+}
+
+// NewAbortIncompleteMultipartUpload instantiates a new AbortIncompleteMultipartUpload object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewAbortIncompleteMultipartUpload() *AbortIncompleteMultipartUpload {
+ this := AbortIncompleteMultipartUpload{}
+
+ return &this
+}
+
+// NewAbortIncompleteMultipartUploadWithDefaults instantiates a new AbortIncompleteMultipartUpload object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewAbortIncompleteMultipartUploadWithDefaults() *AbortIncompleteMultipartUpload {
+ this := AbortIncompleteMultipartUpload{}
+ return &this
+}
+
+// GetDaysAfterInitiation returns the DaysAfterInitiation field value if set, zero value otherwise.
+func (o *AbortIncompleteMultipartUpload) GetDaysAfterInitiation() int32 {
+ if o == nil || IsNil(o.DaysAfterInitiation) {
+ var ret int32
+ return ret
+ }
+ return *o.DaysAfterInitiation
+}
+
+// GetDaysAfterInitiationOk returns a tuple with the DaysAfterInitiation field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *AbortIncompleteMultipartUpload) GetDaysAfterInitiationOk() (*int32, bool) {
+ if o == nil || IsNil(o.DaysAfterInitiation) {
+ return nil, false
+ }
+ return o.DaysAfterInitiation, true
+}
+
+// HasDaysAfterInitiation returns a boolean if a field has been set.
+func (o *AbortIncompleteMultipartUpload) HasDaysAfterInitiation() bool {
+ if o != nil && !IsNil(o.DaysAfterInitiation) {
+ return true
+ }
+
+ return false
+}
+
+// SetDaysAfterInitiation gets a reference to the given int32 and assigns it to the DaysAfterInitiation field.
+func (o *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int32) {
+ o.DaysAfterInitiation = &v
+}
+
+func (o AbortIncompleteMultipartUpload) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o AbortIncompleteMultipartUpload) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DaysAfterInitiation) {
+ toSerialize["DaysAfterInitiation"] = o.DaysAfterInitiation
+ }
+ return toSerialize, nil
+}
+
+type NullableAbortIncompleteMultipartUpload struct {
+ value *AbortIncompleteMultipartUpload
+ isSet bool
+}
+
+func (v NullableAbortIncompleteMultipartUpload) Get() *AbortIncompleteMultipartUpload {
+ return v.value
+}
+
+func (v *NullableAbortIncompleteMultipartUpload) Set(val *AbortIncompleteMultipartUpload) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableAbortIncompleteMultipartUpload) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableAbortIncompleteMultipartUpload) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableAbortIncompleteMultipartUpload(val *AbortIncompleteMultipartUpload) *NullableAbortIncompleteMultipartUpload {
+ return &NullableAbortIncompleteMultipartUpload{value: val, isSet: true}
+}
+
+func (v NullableAbortIncompleteMultipartUpload) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableAbortIncompleteMultipartUpload) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_block_public_access_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_block_public_access_output.go
new file mode 100644
index 0000000000..eda0804717
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_block_public_access_output.go
@@ -0,0 +1,241 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the BlockPublicAccessOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BlockPublicAccessOutput{}
+
+// BlockPublicAccessOutput struct for BlockPublicAccessOutput
+type BlockPublicAccessOutput struct {
+ XMLName xml.Name `xml:"BlockPublicAccessBlockConfiguration"`
+ // Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
+ BlockPublicAcls *bool `json:"BlockPublicAcls,omitempty" xml:"BlockPublicAcls"`
+ // Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
+ IgnorePublicAcls *bool `json:"IgnorePublicAcls,omitempty" xml:"IgnorePublicAcls"`
+ // Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
+ BlockPublicPolicy *bool `json:"BlockPublicPolicy,omitempty" xml:"BlockPublicPolicy"`
+ // Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
+ RestrictPublicBuckets *bool `json:"RestrictPublicBuckets,omitempty" xml:"RestrictPublicBuckets"`
+}
+
+// NewBlockPublicAccessOutput instantiates a new BlockPublicAccessOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBlockPublicAccessOutput() *BlockPublicAccessOutput {
+ this := BlockPublicAccessOutput{}
+
+ return &this
+}
+
+// NewBlockPublicAccessOutputWithDefaults instantiates a new BlockPublicAccessOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBlockPublicAccessOutputWithDefaults() *BlockPublicAccessOutput {
+ this := BlockPublicAccessOutput{}
+ return &this
+}
+
+// GetBlockPublicAcls returns the BlockPublicAcls field value if set, zero value otherwise.
+func (o *BlockPublicAccessOutput) GetBlockPublicAcls() bool {
+ if o == nil || IsNil(o.BlockPublicAcls) {
+ var ret bool
+ return ret
+ }
+ return *o.BlockPublicAcls
+}
+
+// GetBlockPublicAclsOk returns a tuple with the BlockPublicAcls field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BlockPublicAccessOutput) GetBlockPublicAclsOk() (*bool, bool) {
+ if o == nil || IsNil(o.BlockPublicAcls) {
+ return nil, false
+ }
+ return o.BlockPublicAcls, true
+}
+
+// HasBlockPublicAcls returns a boolean if a field has been set.
+func (o *BlockPublicAccessOutput) HasBlockPublicAcls() bool {
+ if o != nil && !IsNil(o.BlockPublicAcls) {
+ return true
+ }
+
+ return false
+}
+
+// SetBlockPublicAcls gets a reference to the given bool and assigns it to the BlockPublicAcls field.
+func (o *BlockPublicAccessOutput) SetBlockPublicAcls(v bool) {
+ o.BlockPublicAcls = &v
+}
+
+// GetIgnorePublicAcls returns the IgnorePublicAcls field value if set, zero value otherwise.
+func (o *BlockPublicAccessOutput) GetIgnorePublicAcls() bool {
+ if o == nil || IsNil(o.IgnorePublicAcls) {
+ var ret bool
+ return ret
+ }
+ return *o.IgnorePublicAcls
+}
+
+// GetIgnorePublicAclsOk returns a tuple with the IgnorePublicAcls field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BlockPublicAccessOutput) GetIgnorePublicAclsOk() (*bool, bool) {
+ if o == nil || IsNil(o.IgnorePublicAcls) {
+ return nil, false
+ }
+ return o.IgnorePublicAcls, true
+}
+
+// HasIgnorePublicAcls returns a boolean if a field has been set.
+func (o *BlockPublicAccessOutput) HasIgnorePublicAcls() bool {
+ if o != nil && !IsNil(o.IgnorePublicAcls) {
+ return true
+ }
+
+ return false
+}
+
+// SetIgnorePublicAcls gets a reference to the given bool and assigns it to the IgnorePublicAcls field.
+func (o *BlockPublicAccessOutput) SetIgnorePublicAcls(v bool) {
+ o.IgnorePublicAcls = &v
+}
+
+// GetBlockPublicPolicy returns the BlockPublicPolicy field value if set, zero value otherwise.
+func (o *BlockPublicAccessOutput) GetBlockPublicPolicy() bool {
+ if o == nil || IsNil(o.BlockPublicPolicy) {
+ var ret bool
+ return ret
+ }
+ return *o.BlockPublicPolicy
+}
+
+// GetBlockPublicPolicyOk returns a tuple with the BlockPublicPolicy field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BlockPublicAccessOutput) GetBlockPublicPolicyOk() (*bool, bool) {
+ if o == nil || IsNil(o.BlockPublicPolicy) {
+ return nil, false
+ }
+ return o.BlockPublicPolicy, true
+}
+
+// HasBlockPublicPolicy returns a boolean if a field has been set.
+func (o *BlockPublicAccessOutput) HasBlockPublicPolicy() bool {
+ if o != nil && !IsNil(o.BlockPublicPolicy) {
+ return true
+ }
+
+ return false
+}
+
+// SetBlockPublicPolicy gets a reference to the given bool and assigns it to the BlockPublicPolicy field.
+func (o *BlockPublicAccessOutput) SetBlockPublicPolicy(v bool) {
+ o.BlockPublicPolicy = &v
+}
+
+// GetRestrictPublicBuckets returns the RestrictPublicBuckets field value if set, zero value otherwise.
+func (o *BlockPublicAccessOutput) GetRestrictPublicBuckets() bool {
+ if o == nil || IsNil(o.RestrictPublicBuckets) {
+ var ret bool
+ return ret
+ }
+ return *o.RestrictPublicBuckets
+}
+
+// GetRestrictPublicBucketsOk returns a tuple with the RestrictPublicBuckets field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BlockPublicAccessOutput) GetRestrictPublicBucketsOk() (*bool, bool) {
+ if o == nil || IsNil(o.RestrictPublicBuckets) {
+ return nil, false
+ }
+ return o.RestrictPublicBuckets, true
+}
+
+// HasRestrictPublicBuckets returns a boolean if a field has been set.
+func (o *BlockPublicAccessOutput) HasRestrictPublicBuckets() bool {
+ if o != nil && !IsNil(o.RestrictPublicBuckets) {
+ return true
+ }
+
+ return false
+}
+
+// SetRestrictPublicBuckets gets a reference to the given bool and assigns it to the RestrictPublicBuckets field.
+func (o *BlockPublicAccessOutput) SetRestrictPublicBuckets(v bool) {
+ o.RestrictPublicBuckets = &v
+}
+
+func (o BlockPublicAccessOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BlockPublicAccessOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.BlockPublicAcls) {
+ toSerialize["BlockPublicAcls"] = o.BlockPublicAcls
+ }
+ if !IsNil(o.IgnorePublicAcls) {
+ toSerialize["IgnorePublicAcls"] = o.IgnorePublicAcls
+ }
+ if !IsNil(o.BlockPublicPolicy) {
+ toSerialize["BlockPublicPolicy"] = o.BlockPublicPolicy
+ }
+ if !IsNil(o.RestrictPublicBuckets) {
+ toSerialize["RestrictPublicBuckets"] = o.RestrictPublicBuckets
+ }
+ return toSerialize, nil
+}
+
+type NullableBlockPublicAccessOutput struct {
+ value *BlockPublicAccessOutput
+ isSet bool
+}
+
+func (v NullableBlockPublicAccessOutput) Get() *BlockPublicAccessOutput {
+ return v.value
+}
+
+func (v *NullableBlockPublicAccessOutput) Set(val *BlockPublicAccessOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBlockPublicAccessOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBlockPublicAccessOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBlockPublicAccessOutput(val *BlockPublicAccessOutput) *NullableBlockPublicAccessOutput {
+ return &NullableBlockPublicAccessOutput{value: val, isSet: true}
+}
+
+func (v NullableBlockPublicAccessOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBlockPublicAccessOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_block_public_access_payload.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_block_public_access_payload.go
new file mode 100644
index 0000000000..65f4c8c7da
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_block_public_access_payload.go
@@ -0,0 +1,258 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the BlockPublicAccessPayload type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BlockPublicAccessPayload{}
+
+// BlockPublicAccessPayload struct for BlockPublicAccessPayload
+type BlockPublicAccessPayload struct {
+ XMLName xml.Name `xml:"PublicAccessBlockConfiguration"`
+ // Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
+ BlockPublicAcls *bool `json:"BlockPublicAcls,omitempty" xml:"BlockPublicAcls"`
+ // Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
+ IgnorePublicAcls *bool `json:"IgnorePublicAcls,omitempty" xml:"IgnorePublicAcls"`
+ // Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
+ BlockPublicPolicy *bool `json:"BlockPublicPolicy,omitempty" xml:"BlockPublicPolicy"`
+ // Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
+ RestrictPublicBuckets *bool `json:"RestrictPublicBuckets,omitempty" xml:"RestrictPublicBuckets"`
+}
+
+// NewBlockPublicAccessPayload instantiates a new BlockPublicAccessPayload object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBlockPublicAccessPayload() *BlockPublicAccessPayload {
+ this := BlockPublicAccessPayload{}
+
+ var blockPublicAcls bool = false
+ this.BlockPublicAcls = &blockPublicAcls
+ var ignorePublicAcls bool = false
+ this.IgnorePublicAcls = &ignorePublicAcls
+ var blockPublicPolicy bool = false
+ this.BlockPublicPolicy = &blockPublicPolicy
+ var restrictPublicBuckets bool = false
+ this.RestrictPublicBuckets = &restrictPublicBuckets
+
+ return &this
+}
+
+// NewBlockPublicAccessPayloadWithDefaults instantiates a new BlockPublicAccessPayload object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBlockPublicAccessPayloadWithDefaults() *BlockPublicAccessPayload {
+ this := BlockPublicAccessPayload{}
+ var blockPublicAcls bool = false
+ this.BlockPublicAcls = &blockPublicAcls
+ var ignorePublicAcls bool = false
+ this.IgnorePublicAcls = &ignorePublicAcls
+ var blockPublicPolicy bool = false
+ this.BlockPublicPolicy = &blockPublicPolicy
+ var restrictPublicBuckets bool = false
+ this.RestrictPublicBuckets = &restrictPublicBuckets
+ return &this
+}
+
+// GetBlockPublicAcls returns the BlockPublicAcls field value if set, zero value otherwise.
+func (o *BlockPublicAccessPayload) GetBlockPublicAcls() bool {
+ if o == nil || IsNil(o.BlockPublicAcls) {
+ var ret bool
+ return ret
+ }
+ return *o.BlockPublicAcls
+}
+
+// GetBlockPublicAclsOk returns a tuple with the BlockPublicAcls field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BlockPublicAccessPayload) GetBlockPublicAclsOk() (*bool, bool) {
+ if o == nil || IsNil(o.BlockPublicAcls) {
+ return nil, false
+ }
+ return o.BlockPublicAcls, true
+}
+
+// HasBlockPublicAcls returns a boolean if a field has been set.
+func (o *BlockPublicAccessPayload) HasBlockPublicAcls() bool {
+ if o != nil && !IsNil(o.BlockPublicAcls) {
+ return true
+ }
+
+ return false
+}
+
+// SetBlockPublicAcls gets a reference to the given bool and assigns it to the BlockPublicAcls field.
+func (o *BlockPublicAccessPayload) SetBlockPublicAcls(v bool) {
+ o.BlockPublicAcls = &v
+}
+
+// GetIgnorePublicAcls returns the IgnorePublicAcls field value if set, zero value otherwise.
+func (o *BlockPublicAccessPayload) GetIgnorePublicAcls() bool {
+ if o == nil || IsNil(o.IgnorePublicAcls) {
+ var ret bool
+ return ret
+ }
+ return *o.IgnorePublicAcls
+}
+
+// GetIgnorePublicAclsOk returns a tuple with the IgnorePublicAcls field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BlockPublicAccessPayload) GetIgnorePublicAclsOk() (*bool, bool) {
+ if o == nil || IsNil(o.IgnorePublicAcls) {
+ return nil, false
+ }
+ return o.IgnorePublicAcls, true
+}
+
+// HasIgnorePublicAcls returns a boolean if a field has been set.
+func (o *BlockPublicAccessPayload) HasIgnorePublicAcls() bool {
+ if o != nil && !IsNil(o.IgnorePublicAcls) {
+ return true
+ }
+
+ return false
+}
+
+// SetIgnorePublicAcls gets a reference to the given bool and assigns it to the IgnorePublicAcls field.
+func (o *BlockPublicAccessPayload) SetIgnorePublicAcls(v bool) {
+ o.IgnorePublicAcls = &v
+}
+
+// GetBlockPublicPolicy returns the BlockPublicPolicy field value if set, zero value otherwise.
+func (o *BlockPublicAccessPayload) GetBlockPublicPolicy() bool {
+ if o == nil || IsNil(o.BlockPublicPolicy) {
+ var ret bool
+ return ret
+ }
+ return *o.BlockPublicPolicy
+}
+
+// GetBlockPublicPolicyOk returns a tuple with the BlockPublicPolicy field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BlockPublicAccessPayload) GetBlockPublicPolicyOk() (*bool, bool) {
+ if o == nil || IsNil(o.BlockPublicPolicy) {
+ return nil, false
+ }
+ return o.BlockPublicPolicy, true
+}
+
+// HasBlockPublicPolicy returns a boolean if a field has been set.
+func (o *BlockPublicAccessPayload) HasBlockPublicPolicy() bool {
+ if o != nil && !IsNil(o.BlockPublicPolicy) {
+ return true
+ }
+
+ return false
+}
+
+// SetBlockPublicPolicy gets a reference to the given bool and assigns it to the BlockPublicPolicy field.
+func (o *BlockPublicAccessPayload) SetBlockPublicPolicy(v bool) {
+ o.BlockPublicPolicy = &v
+}
+
+// GetRestrictPublicBuckets returns the RestrictPublicBuckets field value if set, zero value otherwise.
+func (o *BlockPublicAccessPayload) GetRestrictPublicBuckets() bool {
+ if o == nil || IsNil(o.RestrictPublicBuckets) {
+ var ret bool
+ return ret
+ }
+ return *o.RestrictPublicBuckets
+}
+
+// GetRestrictPublicBucketsOk returns a tuple with the RestrictPublicBuckets field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BlockPublicAccessPayload) GetRestrictPublicBucketsOk() (*bool, bool) {
+ if o == nil || IsNil(o.RestrictPublicBuckets) {
+ return nil, false
+ }
+ return o.RestrictPublicBuckets, true
+}
+
+// HasRestrictPublicBuckets returns a boolean if a field has been set.
+func (o *BlockPublicAccessPayload) HasRestrictPublicBuckets() bool {
+ if o != nil && !IsNil(o.RestrictPublicBuckets) {
+ return true
+ }
+
+ return false
+}
+
+// SetRestrictPublicBuckets gets a reference to the given bool and assigns it to the RestrictPublicBuckets field.
+func (o *BlockPublicAccessPayload) SetRestrictPublicBuckets(v bool) {
+ o.RestrictPublicBuckets = &v
+}
+
+func (o BlockPublicAccessPayload) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BlockPublicAccessPayload) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.BlockPublicAcls) {
+ toSerialize["BlockPublicAcls"] = o.BlockPublicAcls
+ }
+ if !IsNil(o.IgnorePublicAcls) {
+ toSerialize["IgnorePublicAcls"] = o.IgnorePublicAcls
+ }
+ if !IsNil(o.BlockPublicPolicy) {
+ toSerialize["BlockPublicPolicy"] = o.BlockPublicPolicy
+ }
+ if !IsNil(o.RestrictPublicBuckets) {
+ toSerialize["RestrictPublicBuckets"] = o.RestrictPublicBuckets
+ }
+ return toSerialize, nil
+}
+
+type NullableBlockPublicAccessPayload struct {
+ value *BlockPublicAccessPayload
+ isSet bool
+}
+
+func (v NullableBlockPublicAccessPayload) Get() *BlockPublicAccessPayload {
+ return v.value
+}
+
+func (v *NullableBlockPublicAccessPayload) Set(val *BlockPublicAccessPayload) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBlockPublicAccessPayload) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBlockPublicAccessPayload) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBlockPublicAccessPayload(val *BlockPublicAccessPayload) *NullableBlockPublicAccessPayload {
+ return &NullableBlockPublicAccessPayload{value: val, isSet: true}
+}
+
+func (v NullableBlockPublicAccessPayload) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBlockPublicAccessPayload) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket.go
new file mode 100644
index 0000000000..e4db39802b
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket.go
@@ -0,0 +1,168 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the Bucket type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Bucket{}
+
+// Bucket A bucket in object storage is a flat container used to store an unlimited number of objects (files).
+type Bucket struct {
+ XMLName xml.Name `xml:"Bucket"`
+ // The bucket name.
+ Name *string `json:"Name,omitempty" xml:"Name"`
+ // Represents the UTC date and time of bucket creation.
+ CreationDate *IonosTime `json:"CreationDate,omitempty" xml:"CreationDate"`
+}
+
+// NewBucket instantiates a new Bucket object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBucket() *Bucket {
+ this := Bucket{}
+
+ return &this
+}
+
+// NewBucketWithDefaults instantiates a new Bucket object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBucketWithDefaults() *Bucket {
+ this := Bucket{}
+ return &this
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *Bucket) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Bucket) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *Bucket) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *Bucket) SetName(v string) {
+ o.Name = &v
+}
+
+// GetCreationDate returns the CreationDate field value if set, zero value otherwise.
+func (o *Bucket) GetCreationDate() time.Time {
+ if o == nil || IsNil(o.CreationDate) {
+ var ret time.Time
+ return ret
+ }
+ return o.CreationDate.Time
+}
+
+// GetCreationDateOk returns a tuple with the CreationDate field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Bucket) GetCreationDateOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.CreationDate) {
+ return nil, false
+ }
+ return &o.CreationDate.Time, true
+}
+
+// HasCreationDate returns a boolean if a field has been set.
+func (o *Bucket) HasCreationDate() bool {
+ if o != nil && !IsNil(o.CreationDate) {
+ return true
+ }
+
+ return false
+}
+
+// SetCreationDate gets a reference to the given time.Time and assigns it to the CreationDate field.
+func (o *Bucket) SetCreationDate(v time.Time) {
+ o.CreationDate = &IonosTime{v}
+}
+
+func (o Bucket) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Bucket) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Name) {
+ toSerialize["Name"] = o.Name
+ }
+ if !IsNil(o.CreationDate) {
+ toSerialize["CreationDate"] = o.CreationDate
+ }
+ return toSerialize, nil
+}
+
+type NullableBucket struct {
+ value *Bucket
+ isSet bool
+}
+
+func (v NullableBucket) Get() *Bucket {
+ return v.value
+}
+
+func (v *NullableBucket) Set(val *Bucket) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBucket) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBucket) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBucket(val *Bucket) *NullableBucket {
+ return &NullableBucket{value: val, isSet: true}
+}
+
+func (v NullableBucket) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBucket) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_location.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_location.go
new file mode 100644
index 0000000000..b56d608062
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_location.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the BucketLocation type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BucketLocation{}
+
+// BucketLocation struct for BucketLocation
+type BucketLocation struct {
+ XMLName xml.Name `xml:"LocationConstraint"`
+ // Specifies the Region where the bucket resides.
+ LocationConstraint *string `json:"LocationConstraint,omitempty" xml:",chardata"`
+}
+
+// NewBucketLocation instantiates a new BucketLocation object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBucketLocation() *BucketLocation {
+ this := BucketLocation{}
+
+ return &this
+}
+
+// NewBucketLocationWithDefaults instantiates a new BucketLocation object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBucketLocationWithDefaults() *BucketLocation {
+ this := BucketLocation{}
+ return &this
+}
+
+// GetLocationConstraint returns the LocationConstraint field value if set, zero value otherwise.
+func (o *BucketLocation) GetLocationConstraint() string {
+ if o == nil || IsNil(o.LocationConstraint) {
+ var ret string
+ return ret
+ }
+ return *o.LocationConstraint
+}
+
+// GetLocationConstraintOk returns a tuple with the LocationConstraint field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketLocation) GetLocationConstraintOk() (*string, bool) {
+ if o == nil || IsNil(o.LocationConstraint) {
+ return nil, false
+ }
+ return o.LocationConstraint, true
+}
+
+// HasLocationConstraint returns a boolean if a field has been set.
+func (o *BucketLocation) HasLocationConstraint() bool {
+ if o != nil && !IsNil(o.LocationConstraint) {
+ return true
+ }
+
+ return false
+}
+
+// SetLocationConstraint gets a reference to the given string and assigns it to the LocationConstraint field.
+func (o *BucketLocation) SetLocationConstraint(v string) {
+ o.LocationConstraint = &v
+}
+
+func (o BucketLocation) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BucketLocation) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.LocationConstraint) {
+ toSerialize["LocationConstraint"] = o.LocationConstraint
+ }
+ return toSerialize, nil
+}
+
+type NullableBucketLocation struct {
+ value *BucketLocation
+ isSet bool
+}
+
+func (v NullableBucketLocation) Get() *BucketLocation {
+ return v.value
+}
+
+func (v *NullableBucketLocation) Set(val *BucketLocation) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBucketLocation) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBucketLocation) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBucketLocation(val *BucketLocation) *NullableBucketLocation {
+ return &NullableBucketLocation{value: val, isSet: true}
+}
+
+func (v NullableBucketLocation) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBucketLocation) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy.go
new file mode 100644
index 0000000000..10d36008ba
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy.go
@@ -0,0 +1,195 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the BucketPolicy type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BucketPolicy{}
+
+// BucketPolicy struct for BucketPolicy
+type BucketPolicy struct {
+ XMLName xml.Name `xml:"BucketPolicy"`
+ // Specifies an optional identifier for the policy.
+ Id *string `json:"Id,omitempty" xml:"Id"`
+ // Policy version
+ Version *string `json:"Version,omitempty" xml:"Version"`
+ Statement []BucketPolicyStatement `json:"Statement" xml:"Statement"`
+}
+
+// NewBucketPolicy instantiates a new BucketPolicy object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBucketPolicy(statement []BucketPolicyStatement) *BucketPolicy {
+ this := BucketPolicy{}
+
+ this.Statement = statement
+
+ return &this
+}
+
+// NewBucketPolicyWithDefaults instantiates a new BucketPolicy object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBucketPolicyWithDefaults() *BucketPolicy {
+ this := BucketPolicy{}
+ return &this
+}
+
+// GetId returns the Id field value if set, zero value otherwise.
+func (o *BucketPolicy) GetId() string {
+ if o == nil || IsNil(o.Id) {
+ var ret string
+ return ret
+ }
+ return *o.Id
+}
+
+// GetIdOk returns a tuple with the Id field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicy) GetIdOk() (*string, bool) {
+ if o == nil || IsNil(o.Id) {
+ return nil, false
+ }
+ return o.Id, true
+}
+
+// HasId returns a boolean if a field has been set.
+func (o *BucketPolicy) HasId() bool {
+ if o != nil && !IsNil(o.Id) {
+ return true
+ }
+
+ return false
+}
+
+// SetId gets a reference to the given string and assigns it to the Id field.
+func (o *BucketPolicy) SetId(v string) {
+ o.Id = &v
+}
+
+// GetVersion returns the Version field value if set, zero value otherwise.
+func (o *BucketPolicy) GetVersion() string {
+ if o == nil || IsNil(o.Version) {
+ var ret string
+ return ret
+ }
+ return *o.Version
+}
+
+// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicy) GetVersionOk() (*string, bool) {
+ if o == nil || IsNil(o.Version) {
+ return nil, false
+ }
+ return o.Version, true
+}
+
+// HasVersion returns a boolean if a field has been set.
+func (o *BucketPolicy) HasVersion() bool {
+ if o != nil && !IsNil(o.Version) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersion gets a reference to the given string and assigns it to the Version field.
+func (o *BucketPolicy) SetVersion(v string) {
+ o.Version = &v
+}
+
+// GetStatement returns the Statement field value
+func (o *BucketPolicy) GetStatement() []BucketPolicyStatement {
+ if o == nil {
+ var ret []BucketPolicyStatement
+ return ret
+ }
+
+ return o.Statement
+}
+
+// GetStatementOk returns a tuple with the Statement field value
+// and a boolean to check if the value has been set.
+func (o *BucketPolicy) GetStatementOk() ([]BucketPolicyStatement, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.Statement, true
+}
+
+// SetStatement sets field value
+func (o *BucketPolicy) SetStatement(v []BucketPolicyStatement) {
+ o.Statement = v
+}
+
+func (o BucketPolicy) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BucketPolicy) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Id) {
+ toSerialize["Id"] = o.Id
+ }
+ if !IsNil(o.Version) {
+ toSerialize["Version"] = o.Version
+ }
+ toSerialize["Statement"] = o.Statement
+ return toSerialize, nil
+}
+
+type NullableBucketPolicy struct {
+ value *BucketPolicy
+ isSet bool
+}
+
+func (v NullableBucketPolicy) Get() *BucketPolicy {
+ return v.value
+}
+
+func (v *NullableBucketPolicy) Set(val *BucketPolicy) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBucketPolicy) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBucketPolicy) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBucketPolicy(val *BucketPolicy) *NullableBucketPolicy {
+ return &NullableBucketPolicy{value: val, isSet: true}
+}
+
+func (v NullableBucketPolicy) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBucketPolicy) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition.go
new file mode 100644
index 0000000000..23d42106f5
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition.go
@@ -0,0 +1,237 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the BucketPolicyCondition type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BucketPolicyCondition{}
+
+// BucketPolicyCondition Conditions for when a policy is in effect. IONOS Object Storage supports only the following condition operators and keys. Bucket policy does not yet support string interpolation. **Condition Operators** - `IpAddress` - `NotIpAddress` - `DateGreaterThan` - `DateLessThan` **Condition Keys** - `aws:SourceIp` - `aws:CurrentTime` - `aws:EpochTime` Only the following condition keys are supported for the `ListBucket` action: - `s3:prefix` - `s3:delimiter` - `s3:max-keys`
+type BucketPolicyCondition struct {
+ XMLName xml.Name `xml:"BucketPolicyCondition"`
+ IpAddress *BucketPolicyConditionIpAddress `json:"IpAddress,omitempty" xml:"IpAddress"`
+ NotIpAddress *BucketPolicyConditionIpAddress `json:"NotIpAddress,omitempty" xml:"NotIpAddress"`
+ DateGreaterThan *BucketPolicyConditionDate `json:"DateGreaterThan,omitempty" xml:"DateGreaterThan"`
+ DateLessThan *BucketPolicyConditionDate `json:"DateLessThan,omitempty" xml:"DateLessThan"`
+}
+
+// NewBucketPolicyCondition instantiates a new BucketPolicyCondition object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBucketPolicyCondition() *BucketPolicyCondition {
+ this := BucketPolicyCondition{}
+
+ return &this
+}
+
+// NewBucketPolicyConditionWithDefaults instantiates a new BucketPolicyCondition object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBucketPolicyConditionWithDefaults() *BucketPolicyCondition {
+ this := BucketPolicyCondition{}
+ return &this
+}
+
+// GetIpAddress returns the IpAddress field value if set, zero value otherwise.
+func (o *BucketPolicyCondition) GetIpAddress() BucketPolicyConditionIpAddress {
+ if o == nil || IsNil(o.IpAddress) {
+ var ret BucketPolicyConditionIpAddress
+ return ret
+ }
+ return *o.IpAddress
+}
+
+// GetIpAddressOk returns a tuple with the IpAddress field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyCondition) GetIpAddressOk() (*BucketPolicyConditionIpAddress, bool) {
+ if o == nil || IsNil(o.IpAddress) {
+ return nil, false
+ }
+ return o.IpAddress, true
+}
+
+// HasIpAddress returns a boolean if a field has been set.
+func (o *BucketPolicyCondition) HasIpAddress() bool {
+ if o != nil && !IsNil(o.IpAddress) {
+ return true
+ }
+
+ return false
+}
+
+// SetIpAddress gets a reference to the given BucketPolicyConditionIpAddress and assigns it to the IpAddress field.
+func (o *BucketPolicyCondition) SetIpAddress(v BucketPolicyConditionIpAddress) {
+ o.IpAddress = &v
+}
+
+// GetNotIpAddress returns the NotIpAddress field value if set, zero value otherwise.
+func (o *BucketPolicyCondition) GetNotIpAddress() BucketPolicyConditionIpAddress {
+ if o == nil || IsNil(o.NotIpAddress) {
+ var ret BucketPolicyConditionIpAddress
+ return ret
+ }
+ return *o.NotIpAddress
+}
+
+// GetNotIpAddressOk returns a tuple with the NotIpAddress field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyCondition) GetNotIpAddressOk() (*BucketPolicyConditionIpAddress, bool) {
+ if o == nil || IsNil(o.NotIpAddress) {
+ return nil, false
+ }
+ return o.NotIpAddress, true
+}
+
+// HasNotIpAddress returns a boolean if a field has been set.
+func (o *BucketPolicyCondition) HasNotIpAddress() bool {
+ if o != nil && !IsNil(o.NotIpAddress) {
+ return true
+ }
+
+ return false
+}
+
+// SetNotIpAddress gets a reference to the given BucketPolicyConditionIpAddress and assigns it to the NotIpAddress field.
+func (o *BucketPolicyCondition) SetNotIpAddress(v BucketPolicyConditionIpAddress) {
+ o.NotIpAddress = &v
+}
+
+// GetDateGreaterThan returns the DateGreaterThan field value if set, zero value otherwise.
+func (o *BucketPolicyCondition) GetDateGreaterThan() BucketPolicyConditionDate {
+ if o == nil || IsNil(o.DateGreaterThan) {
+ var ret BucketPolicyConditionDate
+ return ret
+ }
+ return *o.DateGreaterThan
+}
+
+// GetDateGreaterThanOk returns a tuple with the DateGreaterThan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyCondition) GetDateGreaterThanOk() (*BucketPolicyConditionDate, bool) {
+ if o == nil || IsNil(o.DateGreaterThan) {
+ return nil, false
+ }
+ return o.DateGreaterThan, true
+}
+
+// HasDateGreaterThan returns a boolean if a field has been set.
+func (o *BucketPolicyCondition) HasDateGreaterThan() bool {
+ if o != nil && !IsNil(o.DateGreaterThan) {
+ return true
+ }
+
+ return false
+}
+
+// SetDateGreaterThan gets a reference to the given BucketPolicyConditionDate and assigns it to the DateGreaterThan field.
+func (o *BucketPolicyCondition) SetDateGreaterThan(v BucketPolicyConditionDate) {
+ o.DateGreaterThan = &v
+}
+
+// GetDateLessThan returns the DateLessThan field value if set, zero value otherwise.
+func (o *BucketPolicyCondition) GetDateLessThan() BucketPolicyConditionDate {
+ if o == nil || IsNil(o.DateLessThan) {
+ var ret BucketPolicyConditionDate
+ return ret
+ }
+ return *o.DateLessThan
+}
+
+// GetDateLessThanOk returns a tuple with the DateLessThan field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyCondition) GetDateLessThanOk() (*BucketPolicyConditionDate, bool) {
+ if o == nil || IsNil(o.DateLessThan) {
+ return nil, false
+ }
+ return o.DateLessThan, true
+}
+
+// HasDateLessThan returns a boolean if a field has been set.
+func (o *BucketPolicyCondition) HasDateLessThan() bool {
+ if o != nil && !IsNil(o.DateLessThan) {
+ return true
+ }
+
+ return false
+}
+
+// SetDateLessThan gets a reference to the given BucketPolicyConditionDate and assigns it to the DateLessThan field.
+func (o *BucketPolicyCondition) SetDateLessThan(v BucketPolicyConditionDate) {
+ o.DateLessThan = &v
+}
+
+func (o BucketPolicyCondition) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BucketPolicyCondition) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.IpAddress) {
+ toSerialize["IpAddress"] = o.IpAddress
+ }
+ if !IsNil(o.NotIpAddress) {
+ toSerialize["NotIpAddress"] = o.NotIpAddress
+ }
+ if !IsNil(o.DateGreaterThan) {
+ toSerialize["DateGreaterThan"] = o.DateGreaterThan
+ }
+ if !IsNil(o.DateLessThan) {
+ toSerialize["DateLessThan"] = o.DateLessThan
+ }
+ return toSerialize, nil
+}
+
+type NullableBucketPolicyCondition struct {
+ value *BucketPolicyCondition
+ isSet bool
+}
+
+func (v NullableBucketPolicyCondition) Get() *BucketPolicyCondition {
+ return v.value
+}
+
+func (v *NullableBucketPolicyCondition) Set(val *BucketPolicyCondition) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBucketPolicyCondition) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBucketPolicyCondition) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBucketPolicyCondition(val *BucketPolicyCondition) *NullableBucketPolicyCondition {
+ return &NullableBucketPolicyCondition{value: val, isSet: true}
+}
+
+func (v NullableBucketPolicyCondition) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBucketPolicyCondition) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition_date.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition_date.go
new file mode 100644
index 0000000000..8b6cd91728
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition_date.go
@@ -0,0 +1,166 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the BucketPolicyConditionDate type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BucketPolicyConditionDate{}
+
+// BucketPolicyConditionDate struct for BucketPolicyConditionDate
+type BucketPolicyConditionDate struct {
+ XMLName xml.Name `xml:"BucketPolicyConditionDate"`
+ AwsCurrentTime *IonosTime `json:"aws:CurrentTime,omitempty" xml:"aws:CurrentTime"`
+ AwsEpochTime *int32 `json:"aws:EpochTime,omitempty" xml:"aws:EpochTime"`
+}
+
+// NewBucketPolicyConditionDate instantiates a new BucketPolicyConditionDate object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBucketPolicyConditionDate() *BucketPolicyConditionDate {
+ this := BucketPolicyConditionDate{}
+
+ return &this
+}
+
+// NewBucketPolicyConditionDateWithDefaults instantiates a new BucketPolicyConditionDate object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBucketPolicyConditionDateWithDefaults() *BucketPolicyConditionDate {
+ this := BucketPolicyConditionDate{}
+ return &this
+}
+
+// GetAwsCurrentTime returns the AwsCurrentTime field value if set, zero value otherwise.
+func (o *BucketPolicyConditionDate) GetAwsCurrentTime() time.Time {
+ if o == nil || IsNil(o.AwsCurrentTime) {
+ var ret time.Time
+ return ret
+ }
+ return o.AwsCurrentTime.Time
+}
+
+// GetAwsCurrentTimeOk returns a tuple with the AwsCurrentTime field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyConditionDate) GetAwsCurrentTimeOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.AwsCurrentTime) {
+ return nil, false
+ }
+ return &o.AwsCurrentTime.Time, true
+}
+
+// HasAwsCurrentTime returns a boolean if a field has been set.
+func (o *BucketPolicyConditionDate) HasAwsCurrentTime() bool {
+ if o != nil && !IsNil(o.AwsCurrentTime) {
+ return true
+ }
+
+ return false
+}
+
+// SetAwsCurrentTime gets a reference to the given time.Time and assigns it to the AwsCurrentTime field.
+func (o *BucketPolicyConditionDate) SetAwsCurrentTime(v time.Time) {
+ o.AwsCurrentTime = &IonosTime{v}
+}
+
+// GetAwsEpochTime returns the AwsEpochTime field value if set, zero value otherwise.
+func (o *BucketPolicyConditionDate) GetAwsEpochTime() int32 {
+ if o == nil || IsNil(o.AwsEpochTime) {
+ var ret int32
+ return ret
+ }
+ return *o.AwsEpochTime
+}
+
+// GetAwsEpochTimeOk returns a tuple with the AwsEpochTime field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyConditionDate) GetAwsEpochTimeOk() (*int32, bool) {
+ if o == nil || IsNil(o.AwsEpochTime) {
+ return nil, false
+ }
+ return o.AwsEpochTime, true
+}
+
+// HasAwsEpochTime returns a boolean if a field has been set.
+func (o *BucketPolicyConditionDate) HasAwsEpochTime() bool {
+ if o != nil && !IsNil(o.AwsEpochTime) {
+ return true
+ }
+
+ return false
+}
+
+// SetAwsEpochTime gets a reference to the given int32 and assigns it to the AwsEpochTime field.
+func (o *BucketPolicyConditionDate) SetAwsEpochTime(v int32) {
+ o.AwsEpochTime = &v
+}
+
+func (o BucketPolicyConditionDate) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BucketPolicyConditionDate) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.AwsCurrentTime) {
+ toSerialize["aws:CurrentTime"] = o.AwsCurrentTime
+ }
+ if !IsNil(o.AwsEpochTime) {
+ toSerialize["aws:EpochTime"] = o.AwsEpochTime
+ }
+ return toSerialize, nil
+}
+
+type NullableBucketPolicyConditionDate struct {
+ value *BucketPolicyConditionDate
+ isSet bool
+}
+
+func (v NullableBucketPolicyConditionDate) Get() *BucketPolicyConditionDate {
+ return v.value
+}
+
+func (v *NullableBucketPolicyConditionDate) Set(val *BucketPolicyConditionDate) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBucketPolicyConditionDate) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBucketPolicyConditionDate) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBucketPolicyConditionDate(val *BucketPolicyConditionDate) *NullableBucketPolicyConditionDate {
+ return &NullableBucketPolicyConditionDate{value: val, isSet: true}
+}
+
+func (v NullableBucketPolicyConditionDate) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBucketPolicyConditionDate) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition_ip_address.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition_ip_address.go
new file mode 100644
index 0000000000..2fd949019a
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_condition_ip_address.go
@@ -0,0 +1,129 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the BucketPolicyConditionIpAddress type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BucketPolicyConditionIpAddress{}
+
+// BucketPolicyConditionIpAddress struct for BucketPolicyConditionIpAddress
+type BucketPolicyConditionIpAddress struct {
+ XMLName xml.Name `xml:"BucketPolicyConditionIpAddress"`
+ AwsSourceIp []string `json:"aws:SourceIp,omitempty" xml:"aws:SourceIp"`
+}
+
+// NewBucketPolicyConditionIpAddress instantiates a new BucketPolicyConditionIpAddress object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBucketPolicyConditionIpAddress() *BucketPolicyConditionIpAddress {
+ this := BucketPolicyConditionIpAddress{}
+
+ return &this
+}
+
+// NewBucketPolicyConditionIpAddressWithDefaults instantiates a new BucketPolicyConditionIpAddress object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBucketPolicyConditionIpAddressWithDefaults() *BucketPolicyConditionIpAddress {
+ this := BucketPolicyConditionIpAddress{}
+ return &this
+}
+
+// GetAwsSourceIp returns the AwsSourceIp field value if set, zero value otherwise.
+func (o *BucketPolicyConditionIpAddress) GetAwsSourceIp() []string {
+ if o == nil || IsNil(o.AwsSourceIp) {
+ var ret []string
+ return ret
+ }
+ return o.AwsSourceIp
+}
+
+// GetAwsSourceIpOk returns a tuple with the AwsSourceIp field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyConditionIpAddress) GetAwsSourceIpOk() ([]string, bool) {
+ if o == nil || IsNil(o.AwsSourceIp) {
+ return nil, false
+ }
+ return o.AwsSourceIp, true
+}
+
+// HasAwsSourceIp returns a boolean if a field has been set.
+func (o *BucketPolicyConditionIpAddress) HasAwsSourceIp() bool {
+ if o != nil && !IsNil(o.AwsSourceIp) {
+ return true
+ }
+
+ return false
+}
+
+// SetAwsSourceIp gets a reference to the given []string and assigns it to the AwsSourceIp field.
+func (o *BucketPolicyConditionIpAddress) SetAwsSourceIp(v []string) {
+ o.AwsSourceIp = v
+}
+
+func (o BucketPolicyConditionIpAddress) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BucketPolicyConditionIpAddress) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.AwsSourceIp) {
+ toSerialize["aws:SourceIp"] = o.AwsSourceIp
+ }
+ return toSerialize, nil
+}
+
+type NullableBucketPolicyConditionIpAddress struct {
+ value *BucketPolicyConditionIpAddress
+ isSet bool
+}
+
+func (v NullableBucketPolicyConditionIpAddress) Get() *BucketPolicyConditionIpAddress {
+ return v.value
+}
+
+func (v *NullableBucketPolicyConditionIpAddress) Set(val *BucketPolicyConditionIpAddress) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBucketPolicyConditionIpAddress) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBucketPolicyConditionIpAddress) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBucketPolicyConditionIpAddress(val *BucketPolicyConditionIpAddress) *NullableBucketPolicyConditionIpAddress {
+ return &NullableBucketPolicyConditionIpAddress{value: val, isSet: true}
+}
+
+func (v NullableBucketPolicyConditionIpAddress) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBucketPolicyConditionIpAddress) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_statement.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_statement.go
new file mode 100644
index 0000000000..6b4f914aa3
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_policy_statement.go
@@ -0,0 +1,287 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the BucketPolicyStatement type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &BucketPolicyStatement{}
+
+// BucketPolicyStatement struct for BucketPolicyStatement
+type BucketPolicyStatement struct {
+ XMLName xml.Name `xml:"BucketPolicyStatement"`
+ // Custom string identifying the statement.
+ Sid *string `json:"Sid,omitempty" xml:"Sid"`
+ // The array of allowed or denied actions. IONOS Object Storage supports the use of a wildcard in your Action configuration (`\"Action\":[\"s3:*\"]`). When an Action wildcard is used together with an object-level Resource element (`\"arn:aws:s3:::/_*\"` or `\"arn:aws:s3:::/\"`), the wildcard denotes all supported Object actions. When an Action wildcard is used together with bucket-level Resource element (`\"arn:aws:s3:::\"`), the wildcard denotes all the bucket actions and bucket subresource actions that IONOS Object Storage supports.
+ Action []string `json:"Action" xml:"Action"`
+ // Specify the outcome when the user requests a particular action.
+ Effect string `json:"Effect" xml:"Effect"`
+ // The bucket or object that the policy applies to. Must be one of the following: - `\"arn:aws:s3:::\"` - For bucket actions (such as `s3:ListBucket`) and bucket subresource actions (such as `s3:GetBucketAcl`). - `\"arn:aws:s3:::/_*\"` or `\"arn:aws:s3:::/\"` - For object actions (such as `s3:PutObject`).
+ Resource []string `json:"Resource" xml:"Resource"`
+ Condition *BucketPolicyCondition `json:"Condition,omitempty" xml:"Condition"`
+ Principal *Principal `json:"Principal,omitempty" xml:"Principal"`
+}
+
+// NewBucketPolicyStatement instantiates a new BucketPolicyStatement object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewBucketPolicyStatement(action []string, effect string, resource []string) *BucketPolicyStatement {
+ this := BucketPolicyStatement{}
+
+ this.Action = action
+ this.Effect = effect
+ this.Resource = resource
+
+ return &this
+}
+
+// NewBucketPolicyStatementWithDefaults instantiates a new BucketPolicyStatement object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewBucketPolicyStatementWithDefaults() *BucketPolicyStatement {
+ this := BucketPolicyStatement{}
+ return &this
+}
+
+// GetSid returns the Sid field value if set, zero value otherwise.
+func (o *BucketPolicyStatement) GetSid() string {
+ if o == nil || IsNil(o.Sid) {
+ var ret string
+ return ret
+ }
+ return *o.Sid
+}
+
+// GetSidOk returns a tuple with the Sid field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyStatement) GetSidOk() (*string, bool) {
+ if o == nil || IsNil(o.Sid) {
+ return nil, false
+ }
+ return o.Sid, true
+}
+
+// HasSid returns a boolean if a field has been set.
+func (o *BucketPolicyStatement) HasSid() bool {
+ if o != nil && !IsNil(o.Sid) {
+ return true
+ }
+
+ return false
+}
+
+// SetSid gets a reference to the given string and assigns it to the Sid field.
+func (o *BucketPolicyStatement) SetSid(v string) {
+ o.Sid = &v
+}
+
+// GetAction returns the Action field value
+func (o *BucketPolicyStatement) GetAction() []string {
+ if o == nil {
+ var ret []string
+ return ret
+ }
+
+ return o.Action
+}
+
+// GetActionOk returns a tuple with the Action field value
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyStatement) GetActionOk() ([]string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.Action, true
+}
+
+// SetAction sets field value
+func (o *BucketPolicyStatement) SetAction(v []string) {
+ o.Action = v
+}
+
+// GetEffect returns the Effect field value
+func (o *BucketPolicyStatement) GetEffect() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Effect
+}
+
+// GetEffectOk returns a tuple with the Effect field value
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyStatement) GetEffectOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Effect, true
+}
+
+// SetEffect sets field value
+func (o *BucketPolicyStatement) SetEffect(v string) {
+ o.Effect = v
+}
+
+// GetResource returns the Resource field value
+func (o *BucketPolicyStatement) GetResource() []string {
+ if o == nil {
+ var ret []string
+ return ret
+ }
+
+ return o.Resource
+}
+
+// GetResourceOk returns a tuple with the Resource field value
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyStatement) GetResourceOk() ([]string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.Resource, true
+}
+
+// SetResource sets field value
+func (o *BucketPolicyStatement) SetResource(v []string) {
+ o.Resource = v
+}
+
+// GetCondition returns the Condition field value if set, zero value otherwise.
+func (o *BucketPolicyStatement) GetCondition() BucketPolicyCondition {
+ if o == nil || IsNil(o.Condition) {
+ var ret BucketPolicyCondition
+ return ret
+ }
+ return *o.Condition
+}
+
+// GetConditionOk returns a tuple with the Condition field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyStatement) GetConditionOk() (*BucketPolicyCondition, bool) {
+ if o == nil || IsNil(o.Condition) {
+ return nil, false
+ }
+ return o.Condition, true
+}
+
+// HasCondition returns a boolean if a field has been set.
+func (o *BucketPolicyStatement) HasCondition() bool {
+ if o != nil && !IsNil(o.Condition) {
+ return true
+ }
+
+ return false
+}
+
+// SetCondition gets a reference to the given BucketPolicyCondition and assigns it to the Condition field.
+func (o *BucketPolicyStatement) SetCondition(v BucketPolicyCondition) {
+ o.Condition = &v
+}
+
+// GetPrincipal returns the Principal field value if set, zero value otherwise.
+func (o *BucketPolicyStatement) GetPrincipal() Principal {
+ if o == nil || IsNil(o.Principal) {
+ var ret Principal
+ return ret
+ }
+ return *o.Principal
+}
+
+// GetPrincipalOk returns a tuple with the Principal field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *BucketPolicyStatement) GetPrincipalOk() (*Principal, bool) {
+ if o == nil || IsNil(o.Principal) {
+ return nil, false
+ }
+ return o.Principal, true
+}
+
+// HasPrincipal returns a boolean if a field has been set.
+func (o *BucketPolicyStatement) HasPrincipal() bool {
+ if o != nil && !IsNil(o.Principal) {
+ return true
+ }
+
+ return false
+}
+
+// SetPrincipal gets a reference to the given Principal and assigns it to the Principal field.
+func (o *BucketPolicyStatement) SetPrincipal(v Principal) {
+ o.Principal = &v
+}
+
+func (o BucketPolicyStatement) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o BucketPolicyStatement) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Sid) {
+ toSerialize["Sid"] = o.Sid
+ }
+ toSerialize["Action"] = o.Action
+ toSerialize["Effect"] = o.Effect
+ toSerialize["Resource"] = o.Resource
+ if !IsNil(o.Condition) {
+ toSerialize["Condition"] = o.Condition
+ }
+ if !IsNil(o.Principal) {
+ toSerialize["Principal"] = o.Principal
+ }
+ return toSerialize, nil
+}
+
+type NullableBucketPolicyStatement struct {
+ value *BucketPolicyStatement
+ isSet bool
+}
+
+func (v NullableBucketPolicyStatement) Get() *BucketPolicyStatement {
+ return v.value
+}
+
+func (v *NullableBucketPolicyStatement) Set(val *BucketPolicyStatement) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBucketPolicyStatement) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBucketPolicyStatement) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBucketPolicyStatement(val *BucketPolicyStatement) *NullableBucketPolicyStatement {
+ return &NullableBucketPolicyStatement{value: val, isSet: true}
+}
+
+func (v NullableBucketPolicyStatement) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBucketPolicyStatement) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_versioning_status.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_versioning_status.go
new file mode 100644
index 0000000000..27c65c467c
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_bucket_versioning_status.go
@@ -0,0 +1,84 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// BucketVersioningStatus The versioning state of the bucket.
+type BucketVersioningStatus string
+
+// List of BucketVersioningStatus
+const (
+ BUCKETVERSIONINGSTATUS_ENABLED BucketVersioningStatus = "Enabled"
+ BUCKETVERSIONINGSTATUS_SUSPENDED BucketVersioningStatus = "Suspended"
+)
+
+func (v *BucketVersioningStatus) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := BucketVersioningStatus(value)
+ for _, existing := range []BucketVersioningStatus{"Enabled", "Suspended"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid BucketVersioningStatus", value)
+}
+
+// Ptr returns reference to BucketVersioningStatus value
+func (v BucketVersioningStatus) Ptr() *BucketVersioningStatus {
+ return &v
+}
+
+type NullableBucketVersioningStatus struct {
+ value *BucketVersioningStatus
+ isSet bool
+}
+
+func (v NullableBucketVersioningStatus) Get() *BucketVersioningStatus {
+ return v.value
+}
+
+func (v *NullableBucketVersioningStatus) Set(val *BucketVersioningStatus) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBucketVersioningStatus) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBucketVersioningStatus) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBucketVersioningStatus(val *BucketVersioningStatus) *NullableBucketVersioningStatus {
+ return &NullableBucketVersioningStatus{value: val, isSet: true}
+}
+
+func (v NullableBucketVersioningStatus) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBucketVersioningStatus) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_common_prefix.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_common_prefix.go
new file mode 100644
index 0000000000..9eff2e26d5
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_common_prefix.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CommonPrefix type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CommonPrefix{}
+
+// CommonPrefix Container for all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix. For example, if the prefix is `notes/` and the delimiter is a slash (`/“) as in `notes/summer/july“, the common prefix is `notes/summer/“.
+type CommonPrefix struct {
+ XMLName xml.Name `xml:"CommonPrefixes"`
+ // Object key prefix that identifies one or more objects to which this rule applies. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ Prefix *string `json:"Prefix,omitempty" xml:"Prefix"`
+}
+
+// NewCommonPrefix instantiates a new CommonPrefix object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCommonPrefix() *CommonPrefix {
+ this := CommonPrefix{}
+
+ return &this
+}
+
+// NewCommonPrefixWithDefaults instantiates a new CommonPrefix object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCommonPrefixWithDefaults() *CommonPrefix {
+ this := CommonPrefix{}
+ return &this
+}
+
+// GetPrefix returns the Prefix field value if set, zero value otherwise.
+func (o *CommonPrefix) GetPrefix() string {
+ if o == nil || IsNil(o.Prefix) {
+ var ret string
+ return ret
+ }
+ return *o.Prefix
+}
+
+// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CommonPrefix) GetPrefixOk() (*string, bool) {
+ if o == nil || IsNil(o.Prefix) {
+ return nil, false
+ }
+ return o.Prefix, true
+}
+
+// HasPrefix returns a boolean if a field has been set.
+func (o *CommonPrefix) HasPrefix() bool {
+ if o != nil && !IsNil(o.Prefix) {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefix gets a reference to the given string and assigns it to the Prefix field.
+func (o *CommonPrefix) SetPrefix(v string) {
+ o.Prefix = &v
+}
+
+func (o CommonPrefix) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CommonPrefix) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Prefix) {
+ toSerialize["Prefix"] = o.Prefix
+ }
+ return toSerialize, nil
+}
+
+type NullableCommonPrefix struct {
+ value *CommonPrefix
+ isSet bool
+}
+
+func (v NullableCommonPrefix) Get() *CommonPrefix {
+ return v.value
+}
+
+func (v *NullableCommonPrefix) Set(val *CommonPrefix) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCommonPrefix) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCommonPrefix) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCommonPrefix(val *CommonPrefix) *NullableCommonPrefix {
+ return &NullableCommonPrefix{value: val, isSet: true}
+}
+
+func (v NullableCommonPrefix) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCommonPrefix) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_complete_multipart_upload_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_complete_multipart_upload_output.go
new file mode 100644
index 0000000000..b9fbd02ca4
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_complete_multipart_upload_output.go
@@ -0,0 +1,241 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CompleteMultipartUploadOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CompleteMultipartUploadOutput{}
+
+// CompleteMultipartUploadOutput struct for CompleteMultipartUploadOutput
+type CompleteMultipartUploadOutput struct {
+ XMLName xml.Name `xml:"CompleteMultipartUploadOutput"`
+ // The URI that identifies the newly created object.
+ Location *string `json:"Location,omitempty" xml:"Location"`
+ // The bucket name.
+ Bucket *string `json:"Bucket,omitempty" xml:"Name"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // Entity tag that identifies the object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.
+ ETag *string `json:"ETag,omitempty" xml:"ETag"`
+}
+
+// NewCompleteMultipartUploadOutput instantiates a new CompleteMultipartUploadOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCompleteMultipartUploadOutput() *CompleteMultipartUploadOutput {
+ this := CompleteMultipartUploadOutput{}
+
+ return &this
+}
+
+// NewCompleteMultipartUploadOutputWithDefaults instantiates a new CompleteMultipartUploadOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCompleteMultipartUploadOutputWithDefaults() *CompleteMultipartUploadOutput {
+ this := CompleteMultipartUploadOutput{}
+ return &this
+}
+
+// GetLocation returns the Location field value if set, zero value otherwise.
+func (o *CompleteMultipartUploadOutput) GetLocation() string {
+ if o == nil || IsNil(o.Location) {
+ var ret string
+ return ret
+ }
+ return *o.Location
+}
+
+// GetLocationOk returns a tuple with the Location field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CompleteMultipartUploadOutput) GetLocationOk() (*string, bool) {
+ if o == nil || IsNil(o.Location) {
+ return nil, false
+ }
+ return o.Location, true
+}
+
+// HasLocation returns a boolean if a field has been set.
+func (o *CompleteMultipartUploadOutput) HasLocation() bool {
+ if o != nil && !IsNil(o.Location) {
+ return true
+ }
+
+ return false
+}
+
+// SetLocation gets a reference to the given string and assigns it to the Location field.
+func (o *CompleteMultipartUploadOutput) SetLocation(v string) {
+ o.Location = &v
+}
+
+// GetBucket returns the Bucket field value if set, zero value otherwise.
+func (o *CompleteMultipartUploadOutput) GetBucket() string {
+ if o == nil || IsNil(o.Bucket) {
+ var ret string
+ return ret
+ }
+ return *o.Bucket
+}
+
+// GetBucketOk returns a tuple with the Bucket field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CompleteMultipartUploadOutput) GetBucketOk() (*string, bool) {
+ if o == nil || IsNil(o.Bucket) {
+ return nil, false
+ }
+ return o.Bucket, true
+}
+
+// HasBucket returns a boolean if a field has been set.
+func (o *CompleteMultipartUploadOutput) HasBucket() bool {
+ if o != nil && !IsNil(o.Bucket) {
+ return true
+ }
+
+ return false
+}
+
+// SetBucket gets a reference to the given string and assigns it to the Bucket field.
+func (o *CompleteMultipartUploadOutput) SetBucket(v string) {
+ o.Bucket = &v
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *CompleteMultipartUploadOutput) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CompleteMultipartUploadOutput) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *CompleteMultipartUploadOutput) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *CompleteMultipartUploadOutput) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetETag returns the ETag field value if set, zero value otherwise.
+func (o *CompleteMultipartUploadOutput) GetETag() string {
+ if o == nil || IsNil(o.ETag) {
+ var ret string
+ return ret
+ }
+ return *o.ETag
+}
+
+// GetETagOk returns a tuple with the ETag field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CompleteMultipartUploadOutput) GetETagOk() (*string, bool) {
+ if o == nil || IsNil(o.ETag) {
+ return nil, false
+ }
+ return o.ETag, true
+}
+
+// HasETag returns a boolean if a field has been set.
+func (o *CompleteMultipartUploadOutput) HasETag() bool {
+ if o != nil && !IsNil(o.ETag) {
+ return true
+ }
+
+ return false
+}
+
+// SetETag gets a reference to the given string and assigns it to the ETag field.
+func (o *CompleteMultipartUploadOutput) SetETag(v string) {
+ o.ETag = &v
+}
+
+func (o CompleteMultipartUploadOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CompleteMultipartUploadOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Location) {
+ toSerialize["Location"] = o.Location
+ }
+ if !IsNil(o.Bucket) {
+ toSerialize["Bucket"] = o.Bucket
+ }
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.ETag) {
+ toSerialize["ETag"] = o.ETag
+ }
+ return toSerialize, nil
+}
+
+type NullableCompleteMultipartUploadOutput struct {
+ value *CompleteMultipartUploadOutput
+ isSet bool
+}
+
+func (v NullableCompleteMultipartUploadOutput) Get() *CompleteMultipartUploadOutput {
+ return v.value
+}
+
+func (v *NullableCompleteMultipartUploadOutput) Set(val *CompleteMultipartUploadOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCompleteMultipartUploadOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCompleteMultipartUploadOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCompleteMultipartUploadOutput(val *CompleteMultipartUploadOutput) *NullableCompleteMultipartUploadOutput {
+ return &NullableCompleteMultipartUploadOutput{value: val, isSet: true}
+}
+
+func (v NullableCompleteMultipartUploadOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCompleteMultipartUploadOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_completed_part.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_completed_part.go
new file mode 100644
index 0000000000..84d9453e89
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_completed_part.go
@@ -0,0 +1,167 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CompletedPart type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CompletedPart{}
+
+// CompletedPart Details of the parts that were uploaded.
+type CompletedPart struct {
+ XMLName xml.Name `xml:"CompletedPart"`
+ // Entity tag that identifies the object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.
+ ETag *string `json:"ETag,omitempty" xml:"ETag"`
+ // Part number that identifies the part.
+ PartNumber *int32 `json:"PartNumber,omitempty" xml:"PartNumber"`
+}
+
+// NewCompletedPart instantiates a new CompletedPart object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCompletedPart() *CompletedPart {
+ this := CompletedPart{}
+
+ return &this
+}
+
+// NewCompletedPartWithDefaults instantiates a new CompletedPart object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCompletedPartWithDefaults() *CompletedPart {
+ this := CompletedPart{}
+ return &this
+}
+
+// GetETag returns the ETag field value if set, zero value otherwise.
+func (o *CompletedPart) GetETag() string {
+ if o == nil || IsNil(o.ETag) {
+ var ret string
+ return ret
+ }
+ return *o.ETag
+}
+
+// GetETagOk returns a tuple with the ETag field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CompletedPart) GetETagOk() (*string, bool) {
+ if o == nil || IsNil(o.ETag) {
+ return nil, false
+ }
+ return o.ETag, true
+}
+
+// HasETag returns a boolean if a field has been set.
+func (o *CompletedPart) HasETag() bool {
+ if o != nil && !IsNil(o.ETag) {
+ return true
+ }
+
+ return false
+}
+
+// SetETag gets a reference to the given string and assigns it to the ETag field.
+func (o *CompletedPart) SetETag(v string) {
+ o.ETag = &v
+}
+
+// GetPartNumber returns the PartNumber field value if set, zero value otherwise.
+func (o *CompletedPart) GetPartNumber() int32 {
+ if o == nil || IsNil(o.PartNumber) {
+ var ret int32
+ return ret
+ }
+ return *o.PartNumber
+}
+
+// GetPartNumberOk returns a tuple with the PartNumber field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CompletedPart) GetPartNumberOk() (*int32, bool) {
+ if o == nil || IsNil(o.PartNumber) {
+ return nil, false
+ }
+ return o.PartNumber, true
+}
+
+// HasPartNumber returns a boolean if a field has been set.
+func (o *CompletedPart) HasPartNumber() bool {
+ if o != nil && !IsNil(o.PartNumber) {
+ return true
+ }
+
+ return false
+}
+
+// SetPartNumber gets a reference to the given int32 and assigns it to the PartNumber field.
+func (o *CompletedPart) SetPartNumber(v int32) {
+ o.PartNumber = &v
+}
+
+func (o CompletedPart) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CompletedPart) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ETag) {
+ toSerialize["ETag"] = o.ETag
+ }
+ if !IsNil(o.PartNumber) {
+ toSerialize["PartNumber"] = o.PartNumber
+ }
+ return toSerialize, nil
+}
+
+type NullableCompletedPart struct {
+ value *CompletedPart
+ isSet bool
+}
+
+func (v NullableCompletedPart) Get() *CompletedPart {
+ return v.value
+}
+
+func (v *NullableCompletedPart) Set(val *CompletedPart) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCompletedPart) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCompletedPart) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCompletedPart(val *CompletedPart) *NullableCompletedPart {
+ return &NullableCompletedPart{value: val, isSet: true}
+}
+
+func (v NullableCompletedPart) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCompletedPart) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_object_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_object_request.go
new file mode 100644
index 0000000000..7eca25e6db
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_object_request.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CopyObjectRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CopyObjectRequest{}
+
+// CopyObjectRequest struct for CopyObjectRequest
+type CopyObjectRequest struct {
+ XMLName xml.Name `xml:"CopyObjectRequest"`
+ // A map of metadata to store with the object in S3.
+ XAmzMeta *map[string]string `json:"x-amz-meta-,omitempty" xml:"x-amz-meta-"`
+}
+
+// NewCopyObjectRequest instantiates a new CopyObjectRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCopyObjectRequest() *CopyObjectRequest {
+ this := CopyObjectRequest{}
+
+ return &this
+}
+
+// NewCopyObjectRequestWithDefaults instantiates a new CopyObjectRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCopyObjectRequestWithDefaults() *CopyObjectRequest {
+ this := CopyObjectRequest{}
+ return &this
+}
+
+// GetXAmzMeta returns the XAmzMeta field value if set, zero value otherwise.
+func (o *CopyObjectRequest) GetXAmzMeta() map[string]string {
+ if o == nil || IsNil(o.XAmzMeta) {
+ var ret map[string]string
+ return ret
+ }
+ return *o.XAmzMeta
+}
+
+// GetXAmzMetaOk returns a tuple with the XAmzMeta field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CopyObjectRequest) GetXAmzMetaOk() (*map[string]string, bool) {
+ if o == nil || IsNil(o.XAmzMeta) {
+ return nil, false
+ }
+ return o.XAmzMeta, true
+}
+
+// HasXAmzMeta returns a boolean if a field has been set.
+func (o *CopyObjectRequest) HasXAmzMeta() bool {
+ if o != nil && !IsNil(o.XAmzMeta) {
+ return true
+ }
+
+ return false
+}
+
+// SetXAmzMeta gets a reference to the given map[string]string and assigns it to the XAmzMeta field.
+func (o *CopyObjectRequest) SetXAmzMeta(v map[string]string) {
+ o.XAmzMeta = &v
+}
+
+func (o CopyObjectRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CopyObjectRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.XAmzMeta) {
+ toSerialize["x-amz-meta-"] = o.XAmzMeta
+ }
+ return toSerialize, nil
+}
+
+type NullableCopyObjectRequest struct {
+ value *CopyObjectRequest
+ isSet bool
+}
+
+func (v NullableCopyObjectRequest) Get() *CopyObjectRequest {
+ return v.value
+}
+
+func (v *NullableCopyObjectRequest) Set(val *CopyObjectRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCopyObjectRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCopyObjectRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCopyObjectRequest(val *CopyObjectRequest) *NullableCopyObjectRequest {
+ return &NullableCopyObjectRequest{value: val, isSet: true}
+}
+
+func (v NullableCopyObjectRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCopyObjectRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_object_result.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_object_result.go
new file mode 100644
index 0000000000..e9e6ad2a9f
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_object_result.go
@@ -0,0 +1,168 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the CopyObjectResult type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CopyObjectResult{}
+
+// CopyObjectResult Container for all response elements.
+type CopyObjectResult struct {
+ XMLName xml.Name `xml:"CopyObjectResult"`
+ // Entity tag that identifies the object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.
+ ETag *string `json:"ETag,omitempty" xml:"ETag"`
+ // Creation date of the object.
+ LastModified *IonosTime `json:"LastModified,omitempty" xml:"LastModified"`
+}
+
+// NewCopyObjectResult instantiates a new CopyObjectResult object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCopyObjectResult() *CopyObjectResult {
+ this := CopyObjectResult{}
+
+ return &this
+}
+
+// NewCopyObjectResultWithDefaults instantiates a new CopyObjectResult object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCopyObjectResultWithDefaults() *CopyObjectResult {
+ this := CopyObjectResult{}
+ return &this
+}
+
+// GetETag returns the ETag field value if set, zero value otherwise.
+func (o *CopyObjectResult) GetETag() string {
+ if o == nil || IsNil(o.ETag) {
+ var ret string
+ return ret
+ }
+ return *o.ETag
+}
+
+// GetETagOk returns a tuple with the ETag field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CopyObjectResult) GetETagOk() (*string, bool) {
+ if o == nil || IsNil(o.ETag) {
+ return nil, false
+ }
+ return o.ETag, true
+}
+
+// HasETag returns a boolean if a field has been set.
+func (o *CopyObjectResult) HasETag() bool {
+ if o != nil && !IsNil(o.ETag) {
+ return true
+ }
+
+ return false
+}
+
+// SetETag gets a reference to the given string and assigns it to the ETag field.
+func (o *CopyObjectResult) SetETag(v string) {
+ o.ETag = &v
+}
+
+// GetLastModified returns the LastModified field value if set, zero value otherwise.
+func (o *CopyObjectResult) GetLastModified() time.Time {
+ if o == nil || IsNil(o.LastModified) {
+ var ret time.Time
+ return ret
+ }
+ return o.LastModified.Time
+}
+
+// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CopyObjectResult) GetLastModifiedOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.LastModified) {
+ return nil, false
+ }
+ return &o.LastModified.Time, true
+}
+
+// HasLastModified returns a boolean if a field has been set.
+func (o *CopyObjectResult) HasLastModified() bool {
+ if o != nil && !IsNil(o.LastModified) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastModified gets a reference to the given time.Time and assigns it to the LastModified field.
+func (o *CopyObjectResult) SetLastModified(v time.Time) {
+ o.LastModified = &IonosTime{v}
+}
+
+func (o CopyObjectResult) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CopyObjectResult) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ETag) {
+ toSerialize["ETag"] = o.ETag
+ }
+ if !IsNil(o.LastModified) {
+ toSerialize["LastModified"] = o.LastModified
+ }
+ return toSerialize, nil
+}
+
+type NullableCopyObjectResult struct {
+ value *CopyObjectResult
+ isSet bool
+}
+
+func (v NullableCopyObjectResult) Get() *CopyObjectResult {
+ return v.value
+}
+
+func (v *NullableCopyObjectResult) Set(val *CopyObjectResult) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCopyObjectResult) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCopyObjectResult) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCopyObjectResult(val *CopyObjectResult) *NullableCopyObjectResult {
+ return &NullableCopyObjectResult{value: val, isSet: true}
+}
+
+func (v NullableCopyObjectResult) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCopyObjectResult) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_part_result.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_part_result.go
new file mode 100644
index 0000000000..6f53053853
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_copy_part_result.go
@@ -0,0 +1,168 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the CopyPartResult type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CopyPartResult{}
+
+// CopyPartResult Container for all response elements.
+type CopyPartResult struct {
+ XMLName xml.Name `xml:"CopyPartResult"`
+ // Entity tag that identifies the object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.
+ ETag *string `json:"ETag,omitempty" xml:"ETag"`
+ // Creation date of the object.
+ LastModified *IonosTime `json:"LastModified,omitempty" xml:"LastModified"`
+}
+
+// NewCopyPartResult instantiates a new CopyPartResult object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCopyPartResult() *CopyPartResult {
+ this := CopyPartResult{}
+
+ return &this
+}
+
+// NewCopyPartResultWithDefaults instantiates a new CopyPartResult object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCopyPartResultWithDefaults() *CopyPartResult {
+ this := CopyPartResult{}
+ return &this
+}
+
+// GetETag returns the ETag field value if set, zero value otherwise.
+func (o *CopyPartResult) GetETag() string {
+ if o == nil || IsNil(o.ETag) {
+ var ret string
+ return ret
+ }
+ return *o.ETag
+}
+
+// GetETagOk returns a tuple with the ETag field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CopyPartResult) GetETagOk() (*string, bool) {
+ if o == nil || IsNil(o.ETag) {
+ return nil, false
+ }
+ return o.ETag, true
+}
+
+// HasETag returns a boolean if a field has been set.
+func (o *CopyPartResult) HasETag() bool {
+ if o != nil && !IsNil(o.ETag) {
+ return true
+ }
+
+ return false
+}
+
+// SetETag gets a reference to the given string and assigns it to the ETag field.
+func (o *CopyPartResult) SetETag(v string) {
+ o.ETag = &v
+}
+
+// GetLastModified returns the LastModified field value if set, zero value otherwise.
+func (o *CopyPartResult) GetLastModified() time.Time {
+ if o == nil || IsNil(o.LastModified) {
+ var ret time.Time
+ return ret
+ }
+ return o.LastModified.Time
+}
+
+// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CopyPartResult) GetLastModifiedOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.LastModified) {
+ return nil, false
+ }
+ return &o.LastModified.Time, true
+}
+
+// HasLastModified returns a boolean if a field has been set.
+func (o *CopyPartResult) HasLastModified() bool {
+ if o != nil && !IsNil(o.LastModified) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastModified gets a reference to the given time.Time and assigns it to the LastModified field.
+func (o *CopyPartResult) SetLastModified(v time.Time) {
+ o.LastModified = &IonosTime{v}
+}
+
+func (o CopyPartResult) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CopyPartResult) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ETag) {
+ toSerialize["ETag"] = o.ETag
+ }
+ if !IsNil(o.LastModified) {
+ toSerialize["LastModified"] = o.LastModified
+ }
+ return toSerialize, nil
+}
+
+type NullableCopyPartResult struct {
+ value *CopyPartResult
+ isSet bool
+}
+
+func (v NullableCopyPartResult) Get() *CopyPartResult {
+ return v.value
+}
+
+func (v *NullableCopyPartResult) Set(val *CopyPartResult) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCopyPartResult) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCopyPartResult) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCopyPartResult(val *CopyPartResult) *NullableCopyPartResult {
+ return &NullableCopyPartResult{value: val, isSet: true}
+}
+
+func (v NullableCopyPartResult) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCopyPartResult) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_cors_rule.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_cors_rule.go
new file mode 100644
index 0000000000..ee74b66d3d
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_cors_rule.go
@@ -0,0 +1,298 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CORSRule type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CORSRule{}
+
+// CORSRule Specifies a cross-origin access rule for an IONOS Object Storage bucket.
+type CORSRule struct {
+ XMLName xml.Name `xml:"CORSRule"`
+ // Container for the Contract Number of the owner.
+ ID *int32 `json:"ID,omitempty" xml:"ID"`
+ // Headers that are specified in the `Access-Control-Request-Headers` header. These headers are allowed in a preflight OPTIONS request. In response to any preflight OPTIONS request, IONOS Object Storage returns any requested headers that are allowed.
+ AllowedHeaders []string `json:"AllowedHeaders,omitempty" xml:"AllowedHeader"`
+ // An HTTP method that you allow the origin to execute. Valid values are `GET`, `PUT`, `HEAD`, `POST`, and `DELETE`.
+ AllowedMethods []string `json:"AllowedMethods" xml:"AllowedMethod"`
+ // One or more origins you want customers to be able to access the bucket from.
+ AllowedOrigins []string `json:"AllowedOrigins" xml:"AllowedOrigin"`
+ // One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript `XMLHttpRequest` object).
+ ExposeHeaders []string `json:"ExposeHeaders,omitempty" xml:"ExposeHeader"`
+ // The time in seconds that your browser is to cache the preflight response for the specified resource.
+ MaxAgeSeconds *int32 `json:"MaxAgeSeconds,omitempty" xml:"MaxAgeSeconds"`
+}
+
+// NewCORSRule instantiates a new CORSRule object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCORSRule(allowedMethods []string, allowedOrigins []string) *CORSRule {
+ this := CORSRule{}
+
+ this.AllowedMethods = allowedMethods
+ this.AllowedOrigins = allowedOrigins
+
+ return &this
+}
+
+// NewCORSRuleWithDefaults instantiates a new CORSRule object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCORSRuleWithDefaults() *CORSRule {
+ this := CORSRule{}
+ return &this
+}
+
+// GetID returns the ID field value if set, zero value otherwise.
+func (o *CORSRule) GetID() int32 {
+ if o == nil || IsNil(o.ID) {
+ var ret int32
+ return ret
+ }
+ return *o.ID
+}
+
+// GetIDOk returns a tuple with the ID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CORSRule) GetIDOk() (*int32, bool) {
+ if o == nil || IsNil(o.ID) {
+ return nil, false
+ }
+ return o.ID, true
+}
+
+// HasID returns a boolean if a field has been set.
+func (o *CORSRule) HasID() bool {
+ if o != nil && !IsNil(o.ID) {
+ return true
+ }
+
+ return false
+}
+
+// SetID gets a reference to the given int32 and assigns it to the ID field.
+func (o *CORSRule) SetID(v int32) {
+ o.ID = &v
+}
+
+// GetAllowedHeaders returns the AllowedHeaders field value if set, zero value otherwise.
+func (o *CORSRule) GetAllowedHeaders() []string {
+ if o == nil || IsNil(o.AllowedHeaders) {
+ var ret []string
+ return ret
+ }
+ return o.AllowedHeaders
+}
+
+// GetAllowedHeadersOk returns a tuple with the AllowedHeaders field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CORSRule) GetAllowedHeadersOk() ([]string, bool) {
+ if o == nil || IsNil(o.AllowedHeaders) {
+ return nil, false
+ }
+ return o.AllowedHeaders, true
+}
+
+// HasAllowedHeaders returns a boolean if a field has been set.
+func (o *CORSRule) HasAllowedHeaders() bool {
+ if o != nil && !IsNil(o.AllowedHeaders) {
+ return true
+ }
+
+ return false
+}
+
+// SetAllowedHeaders gets a reference to the given []string and assigns it to the AllowedHeaders field.
+func (o *CORSRule) SetAllowedHeaders(v []string) {
+ o.AllowedHeaders = v
+}
+
+// GetAllowedMethods returns the AllowedMethods field value
+func (o *CORSRule) GetAllowedMethods() []string {
+ if o == nil {
+ var ret []string
+ return ret
+ }
+
+ return o.AllowedMethods
+}
+
+// GetAllowedMethodsOk returns a tuple with the AllowedMethods field value
+// and a boolean to check if the value has been set.
+func (o *CORSRule) GetAllowedMethodsOk() ([]string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.AllowedMethods, true
+}
+
+// SetAllowedMethods sets field value
+func (o *CORSRule) SetAllowedMethods(v []string) {
+ o.AllowedMethods = v
+}
+
+// GetAllowedOrigins returns the AllowedOrigins field value
+func (o *CORSRule) GetAllowedOrigins() []string {
+ if o == nil {
+ var ret []string
+ return ret
+ }
+
+ return o.AllowedOrigins
+}
+
+// GetAllowedOriginsOk returns a tuple with the AllowedOrigins field value
+// and a boolean to check if the value has been set.
+func (o *CORSRule) GetAllowedOriginsOk() ([]string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.AllowedOrigins, true
+}
+
+// SetAllowedOrigins sets field value
+func (o *CORSRule) SetAllowedOrigins(v []string) {
+ o.AllowedOrigins = v
+}
+
+// GetExposeHeaders returns the ExposeHeaders field value if set, zero value otherwise.
+func (o *CORSRule) GetExposeHeaders() []string {
+ if o == nil || IsNil(o.ExposeHeaders) {
+ var ret []string
+ return ret
+ }
+ return o.ExposeHeaders
+}
+
+// GetExposeHeadersOk returns a tuple with the ExposeHeaders field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CORSRule) GetExposeHeadersOk() ([]string, bool) {
+ if o == nil || IsNil(o.ExposeHeaders) {
+ return nil, false
+ }
+ return o.ExposeHeaders, true
+}
+
+// HasExposeHeaders returns a boolean if a field has been set.
+func (o *CORSRule) HasExposeHeaders() bool {
+ if o != nil && !IsNil(o.ExposeHeaders) {
+ return true
+ }
+
+ return false
+}
+
+// SetExposeHeaders gets a reference to the given []string and assigns it to the ExposeHeaders field.
+func (o *CORSRule) SetExposeHeaders(v []string) {
+ o.ExposeHeaders = v
+}
+
+// GetMaxAgeSeconds returns the MaxAgeSeconds field value if set, zero value otherwise.
+func (o *CORSRule) GetMaxAgeSeconds() int32 {
+ if o == nil || IsNil(o.MaxAgeSeconds) {
+ var ret int32
+ return ret
+ }
+ return *o.MaxAgeSeconds
+}
+
+// GetMaxAgeSecondsOk returns a tuple with the MaxAgeSeconds field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CORSRule) GetMaxAgeSecondsOk() (*int32, bool) {
+ if o == nil || IsNil(o.MaxAgeSeconds) {
+ return nil, false
+ }
+ return o.MaxAgeSeconds, true
+}
+
+// HasMaxAgeSeconds returns a boolean if a field has been set.
+func (o *CORSRule) HasMaxAgeSeconds() bool {
+ if o != nil && !IsNil(o.MaxAgeSeconds) {
+ return true
+ }
+
+ return false
+}
+
+// SetMaxAgeSeconds gets a reference to the given int32 and assigns it to the MaxAgeSeconds field.
+func (o *CORSRule) SetMaxAgeSeconds(v int32) {
+ o.MaxAgeSeconds = &v
+}
+
+func (o CORSRule) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CORSRule) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ID) {
+ toSerialize["ID"] = o.ID
+ }
+ if !IsNil(o.AllowedHeaders) {
+ toSerialize["AllowedHeaders"] = o.AllowedHeaders
+ }
+ toSerialize["AllowedMethods"] = o.AllowedMethods
+ toSerialize["AllowedOrigins"] = o.AllowedOrigins
+ if !IsNil(o.ExposeHeaders) {
+ toSerialize["ExposeHeaders"] = o.ExposeHeaders
+ }
+ if !IsNil(o.MaxAgeSeconds) {
+ toSerialize["MaxAgeSeconds"] = o.MaxAgeSeconds
+ }
+ return toSerialize, nil
+}
+
+type NullableCORSRule struct {
+ value *CORSRule
+ isSet bool
+}
+
+func (v NullableCORSRule) Get() *CORSRule {
+ return v.value
+}
+
+func (v *NullableCORSRule) Set(val *CORSRule) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCORSRule) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCORSRule) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCORSRule(val *CORSRule) *NullableCORSRule {
+ return &NullableCORSRule{value: val, isSet: true}
+}
+
+func (v NullableCORSRule) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCORSRule) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_create_bucket_configuration.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_create_bucket_configuration.go
new file mode 100644
index 0000000000..d4e831a429
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_create_bucket_configuration.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CreateBucketConfiguration type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CreateBucketConfiguration{}
+
+// CreateBucketConfiguration The configuration information for the bucket.
+type CreateBucketConfiguration struct {
+ XMLName xml.Name `xml:"CreateBucketConfiguration"`
+ // Specifies the Region where the bucket will be created. Please refer to the list of available regions.
+ LocationConstraint *string `json:"LocationConstraint,omitempty" xml:"LocationConstraint"`
+}
+
+// NewCreateBucketConfiguration instantiates a new CreateBucketConfiguration object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateBucketConfiguration() *CreateBucketConfiguration {
+ this := CreateBucketConfiguration{}
+
+ return &this
+}
+
+// NewCreateBucketConfigurationWithDefaults instantiates a new CreateBucketConfiguration object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateBucketConfigurationWithDefaults() *CreateBucketConfiguration {
+ this := CreateBucketConfiguration{}
+ return &this
+}
+
+// GetLocationConstraint returns the LocationConstraint field value if set, zero value otherwise.
+func (o *CreateBucketConfiguration) GetLocationConstraint() string {
+ if o == nil || IsNil(o.LocationConstraint) {
+ var ret string
+ return ret
+ }
+ return *o.LocationConstraint
+}
+
+// GetLocationConstraintOk returns a tuple with the LocationConstraint field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateBucketConfiguration) GetLocationConstraintOk() (*string, bool) {
+ if o == nil || IsNil(o.LocationConstraint) {
+ return nil, false
+ }
+ return o.LocationConstraint, true
+}
+
+// HasLocationConstraint returns a boolean if a field has been set.
+func (o *CreateBucketConfiguration) HasLocationConstraint() bool {
+ if o != nil && !IsNil(o.LocationConstraint) {
+ return true
+ }
+
+ return false
+}
+
+// SetLocationConstraint gets a reference to the given string and assigns it to the LocationConstraint field.
+func (o *CreateBucketConfiguration) SetLocationConstraint(v string) {
+ o.LocationConstraint = &v
+}
+
+func (o CreateBucketConfiguration) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CreateBucketConfiguration) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.LocationConstraint) {
+ toSerialize["LocationConstraint"] = o.LocationConstraint
+ }
+ return toSerialize, nil
+}
+
+type NullableCreateBucketConfiguration struct {
+ value *CreateBucketConfiguration
+ isSet bool
+}
+
+func (v NullableCreateBucketConfiguration) Get() *CreateBucketConfiguration {
+ return v.value
+}
+
+func (v *NullableCreateBucketConfiguration) Set(val *CreateBucketConfiguration) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateBucketConfiguration) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateBucketConfiguration) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateBucketConfiguration(val *CreateBucketConfiguration) *NullableCreateBucketConfiguration {
+ return &NullableCreateBucketConfiguration{value: val, isSet: true}
+}
+
+func (v NullableCreateBucketConfiguration) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateBucketConfiguration) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_create_multipart_upload_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_create_multipart_upload_output.go
new file mode 100644
index 0000000000..1a4c86ecc3
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_create_multipart_upload_output.go
@@ -0,0 +1,204 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CreateMultipartUploadOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CreateMultipartUploadOutput{}
+
+// CreateMultipartUploadOutput struct for CreateMultipartUploadOutput
+type CreateMultipartUploadOutput struct {
+ XMLName xml.Name `xml:"CreateMultipartUploadOutput"`
+ // The bucket name.
+ Bucket *string `json:"Bucket,omitempty" xml:"Name"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // ID of the multipart upload.
+ UploadId *string `json:"UploadId,omitempty" xml:"UploadId"`
+}
+
+// NewCreateMultipartUploadOutput instantiates a new CreateMultipartUploadOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCreateMultipartUploadOutput() *CreateMultipartUploadOutput {
+ this := CreateMultipartUploadOutput{}
+
+ return &this
+}
+
+// NewCreateMultipartUploadOutputWithDefaults instantiates a new CreateMultipartUploadOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCreateMultipartUploadOutputWithDefaults() *CreateMultipartUploadOutput {
+ this := CreateMultipartUploadOutput{}
+ return &this
+}
+
+// GetBucket returns the Bucket field value if set, zero value otherwise.
+func (o *CreateMultipartUploadOutput) GetBucket() string {
+ if o == nil || IsNil(o.Bucket) {
+ var ret string
+ return ret
+ }
+ return *o.Bucket
+}
+
+// GetBucketOk returns a tuple with the Bucket field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateMultipartUploadOutput) GetBucketOk() (*string, bool) {
+ if o == nil || IsNil(o.Bucket) {
+ return nil, false
+ }
+ return o.Bucket, true
+}
+
+// HasBucket returns a boolean if a field has been set.
+func (o *CreateMultipartUploadOutput) HasBucket() bool {
+ if o != nil && !IsNil(o.Bucket) {
+ return true
+ }
+
+ return false
+}
+
+// SetBucket gets a reference to the given string and assigns it to the Bucket field.
+func (o *CreateMultipartUploadOutput) SetBucket(v string) {
+ o.Bucket = &v
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *CreateMultipartUploadOutput) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateMultipartUploadOutput) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *CreateMultipartUploadOutput) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *CreateMultipartUploadOutput) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetUploadId returns the UploadId field value if set, zero value otherwise.
+func (o *CreateMultipartUploadOutput) GetUploadId() string {
+ if o == nil || IsNil(o.UploadId) {
+ var ret string
+ return ret
+ }
+ return *o.UploadId
+}
+
+// GetUploadIdOk returns a tuple with the UploadId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CreateMultipartUploadOutput) GetUploadIdOk() (*string, bool) {
+ if o == nil || IsNil(o.UploadId) {
+ return nil, false
+ }
+ return o.UploadId, true
+}
+
+// HasUploadId returns a boolean if a field has been set.
+func (o *CreateMultipartUploadOutput) HasUploadId() bool {
+ if o != nil && !IsNil(o.UploadId) {
+ return true
+ }
+
+ return false
+}
+
+// SetUploadId gets a reference to the given string and assigns it to the UploadId field.
+func (o *CreateMultipartUploadOutput) SetUploadId(v string) {
+ o.UploadId = &v
+}
+
+func (o CreateMultipartUploadOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CreateMultipartUploadOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Bucket) {
+ toSerialize["Bucket"] = o.Bucket
+ }
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.UploadId) {
+ toSerialize["UploadId"] = o.UploadId
+ }
+ return toSerialize, nil
+}
+
+type NullableCreateMultipartUploadOutput struct {
+ value *CreateMultipartUploadOutput
+ isSet bool
+}
+
+func (v NullableCreateMultipartUploadOutput) Get() *CreateMultipartUploadOutput {
+ return v.value
+}
+
+func (v *NullableCreateMultipartUploadOutput) Set(val *CreateMultipartUploadOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCreateMultipartUploadOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCreateMultipartUploadOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCreateMultipartUploadOutput(val *CreateMultipartUploadOutput) *NullableCreateMultipartUploadOutput {
+ return &NullableCreateMultipartUploadOutput{value: val, isSet: true}
+}
+
+func (v NullableCreateMultipartUploadOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCreateMultipartUploadOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_csv_input.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_csv_input.go
new file mode 100644
index 0000000000..efa3d95c75
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_csv_input.go
@@ -0,0 +1,352 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CSVInput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CSVInput{}
+
+// CSVInput Describes how an uncompressed comma-separated values (CSV)-formatted input object is formatted.
+type CSVInput struct {
+ XMLName xml.Name `xml:"CSVInput"`
+ // Describes the first line of input. Valid values are:
-
`NONE`: First line is not a header.
-
`IGNORE`: First line is a header, but you can't use the header values to indicate the column in an expression. You can use column position (such as _1, _2, …) to indicate the column (`SELECT s._1 FROM OBJECT s`).
-
`Use`: First line is a header, and you can use the header value to identify a column in an expression (`SELECT \"name\" FROM OBJECT`).
+ FileHeaderInfo *string `json:"FileHeaderInfo,omitempty" xml:"FileHeaderInfo"`
+ // A single character used to indicate that a row should be ignored when the character is present at the start of that row. You can specify any character to indicate a comment line.
+ Comments *string `json:"Comments,omitempty" xml:"Comments"`
+ // A single character used for escaping the quotation mark character inside an already escaped value. For example, the value \"\"\" a , b \"\"\" is parsed as \" a , b \".
+ QuoteEscapeCharacter *string `json:"QuoteEscapeCharacter,omitempty" xml:"QuoteEscapeCharacter"`
+ // A single character used to separate individual records in the input. Instead of the default value, you can specify an arbitrary delimiter.
+ RecordDelimiter *string `json:"RecordDelimiter,omitempty" xml:"RecordDelimiter"`
+ // A single character used to separate individual fields in a record. You can specify an arbitrary delimiter.
+ FieldDelimiter *string `json:"FieldDelimiter,omitempty" xml:"FieldDelimiter"`
+ // A single character used for escaping when the field delimiter is part of the value. For example, if the value is `a, b`, IONOS Object Storage wraps this field value in quotation marks, as follows: `\" a , b \"`.
Type: String
Default: `\"`
Ancestors: `CSV`
+ QuoteCharacter *string `json:"QuoteCharacter,omitempty" xml:"QuoteCharacter"`
+ // Specifies that CSV field values may contain quoted record delimiters and such records should be allowed. Default value is FALSE. Setting this value to TRUE may lower performance.
+ AllowQuotedRecordDelimiter *bool `json:"AllowQuotedRecordDelimiter,omitempty" xml:"AllowQuotedRecordDelimiter"`
+}
+
+// NewCSVInput instantiates a new CSVInput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCSVInput() *CSVInput {
+ this := CSVInput{}
+
+ return &this
+}
+
+// NewCSVInputWithDefaults instantiates a new CSVInput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCSVInputWithDefaults() *CSVInput {
+ this := CSVInput{}
+ return &this
+}
+
+// GetFileHeaderInfo returns the FileHeaderInfo field value if set, zero value otherwise.
+func (o *CSVInput) GetFileHeaderInfo() string {
+ if o == nil || IsNil(o.FileHeaderInfo) {
+ var ret string
+ return ret
+ }
+ return *o.FileHeaderInfo
+}
+
+// GetFileHeaderInfoOk returns a tuple with the FileHeaderInfo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVInput) GetFileHeaderInfoOk() (*string, bool) {
+ if o == nil || IsNil(o.FileHeaderInfo) {
+ return nil, false
+ }
+ return o.FileHeaderInfo, true
+}
+
+// HasFileHeaderInfo returns a boolean if a field has been set.
+func (o *CSVInput) HasFileHeaderInfo() bool {
+ if o != nil && !IsNil(o.FileHeaderInfo) {
+ return true
+ }
+
+ return false
+}
+
+// SetFileHeaderInfo gets a reference to the given string and assigns it to the FileHeaderInfo field.
+func (o *CSVInput) SetFileHeaderInfo(v string) {
+ o.FileHeaderInfo = &v
+}
+
+// GetComments returns the Comments field value if set, zero value otherwise.
+func (o *CSVInput) GetComments() string {
+ if o == nil || IsNil(o.Comments) {
+ var ret string
+ return ret
+ }
+ return *o.Comments
+}
+
+// GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVInput) GetCommentsOk() (*string, bool) {
+ if o == nil || IsNil(o.Comments) {
+ return nil, false
+ }
+ return o.Comments, true
+}
+
+// HasComments returns a boolean if a field has been set.
+func (o *CSVInput) HasComments() bool {
+ if o != nil && !IsNil(o.Comments) {
+ return true
+ }
+
+ return false
+}
+
+// SetComments gets a reference to the given string and assigns it to the Comments field.
+func (o *CSVInput) SetComments(v string) {
+ o.Comments = &v
+}
+
+// GetQuoteEscapeCharacter returns the QuoteEscapeCharacter field value if set, zero value otherwise.
+func (o *CSVInput) GetQuoteEscapeCharacter() string {
+ if o == nil || IsNil(o.QuoteEscapeCharacter) {
+ var ret string
+ return ret
+ }
+ return *o.QuoteEscapeCharacter
+}
+
+// GetQuoteEscapeCharacterOk returns a tuple with the QuoteEscapeCharacter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVInput) GetQuoteEscapeCharacterOk() (*string, bool) {
+ if o == nil || IsNil(o.QuoteEscapeCharacter) {
+ return nil, false
+ }
+ return o.QuoteEscapeCharacter, true
+}
+
+// HasQuoteEscapeCharacter returns a boolean if a field has been set.
+func (o *CSVInput) HasQuoteEscapeCharacter() bool {
+ if o != nil && !IsNil(o.QuoteEscapeCharacter) {
+ return true
+ }
+
+ return false
+}
+
+// SetQuoteEscapeCharacter gets a reference to the given string and assigns it to the QuoteEscapeCharacter field.
+func (o *CSVInput) SetQuoteEscapeCharacter(v string) {
+ o.QuoteEscapeCharacter = &v
+}
+
+// GetRecordDelimiter returns the RecordDelimiter field value if set, zero value otherwise.
+func (o *CSVInput) GetRecordDelimiter() string {
+ if o == nil || IsNil(o.RecordDelimiter) {
+ var ret string
+ return ret
+ }
+ return *o.RecordDelimiter
+}
+
+// GetRecordDelimiterOk returns a tuple with the RecordDelimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVInput) GetRecordDelimiterOk() (*string, bool) {
+ if o == nil || IsNil(o.RecordDelimiter) {
+ return nil, false
+ }
+ return o.RecordDelimiter, true
+}
+
+// HasRecordDelimiter returns a boolean if a field has been set.
+func (o *CSVInput) HasRecordDelimiter() bool {
+ if o != nil && !IsNil(o.RecordDelimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetRecordDelimiter gets a reference to the given string and assigns it to the RecordDelimiter field.
+func (o *CSVInput) SetRecordDelimiter(v string) {
+ o.RecordDelimiter = &v
+}
+
+// GetFieldDelimiter returns the FieldDelimiter field value if set, zero value otherwise.
+func (o *CSVInput) GetFieldDelimiter() string {
+ if o == nil || IsNil(o.FieldDelimiter) {
+ var ret string
+ return ret
+ }
+ return *o.FieldDelimiter
+}
+
+// GetFieldDelimiterOk returns a tuple with the FieldDelimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVInput) GetFieldDelimiterOk() (*string, bool) {
+ if o == nil || IsNil(o.FieldDelimiter) {
+ return nil, false
+ }
+ return o.FieldDelimiter, true
+}
+
+// HasFieldDelimiter returns a boolean if a field has been set.
+func (o *CSVInput) HasFieldDelimiter() bool {
+ if o != nil && !IsNil(o.FieldDelimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetFieldDelimiter gets a reference to the given string and assigns it to the FieldDelimiter field.
+func (o *CSVInput) SetFieldDelimiter(v string) {
+ o.FieldDelimiter = &v
+}
+
+// GetQuoteCharacter returns the QuoteCharacter field value if set, zero value otherwise.
+func (o *CSVInput) GetQuoteCharacter() string {
+ if o == nil || IsNil(o.QuoteCharacter) {
+ var ret string
+ return ret
+ }
+ return *o.QuoteCharacter
+}
+
+// GetQuoteCharacterOk returns a tuple with the QuoteCharacter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVInput) GetQuoteCharacterOk() (*string, bool) {
+ if o == nil || IsNil(o.QuoteCharacter) {
+ return nil, false
+ }
+ return o.QuoteCharacter, true
+}
+
+// HasQuoteCharacter returns a boolean if a field has been set.
+func (o *CSVInput) HasQuoteCharacter() bool {
+ if o != nil && !IsNil(o.QuoteCharacter) {
+ return true
+ }
+
+ return false
+}
+
+// SetQuoteCharacter gets a reference to the given string and assigns it to the QuoteCharacter field.
+func (o *CSVInput) SetQuoteCharacter(v string) {
+ o.QuoteCharacter = &v
+}
+
+// GetAllowQuotedRecordDelimiter returns the AllowQuotedRecordDelimiter field value if set, zero value otherwise.
+func (o *CSVInput) GetAllowQuotedRecordDelimiter() bool {
+ if o == nil || IsNil(o.AllowQuotedRecordDelimiter) {
+ var ret bool
+ return ret
+ }
+ return *o.AllowQuotedRecordDelimiter
+}
+
+// GetAllowQuotedRecordDelimiterOk returns a tuple with the AllowQuotedRecordDelimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVInput) GetAllowQuotedRecordDelimiterOk() (*bool, bool) {
+ if o == nil || IsNil(o.AllowQuotedRecordDelimiter) {
+ return nil, false
+ }
+ return o.AllowQuotedRecordDelimiter, true
+}
+
+// HasAllowQuotedRecordDelimiter returns a boolean if a field has been set.
+func (o *CSVInput) HasAllowQuotedRecordDelimiter() bool {
+ if o != nil && !IsNil(o.AllowQuotedRecordDelimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetAllowQuotedRecordDelimiter gets a reference to the given bool and assigns it to the AllowQuotedRecordDelimiter field.
+func (o *CSVInput) SetAllowQuotedRecordDelimiter(v bool) {
+ o.AllowQuotedRecordDelimiter = &v
+}
+
+func (o CSVInput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CSVInput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.FileHeaderInfo) {
+ toSerialize["FileHeaderInfo"] = o.FileHeaderInfo
+ }
+ if !IsNil(o.Comments) {
+ toSerialize["Comments"] = o.Comments
+ }
+ if !IsNil(o.QuoteEscapeCharacter) {
+ toSerialize["QuoteEscapeCharacter"] = o.QuoteEscapeCharacter
+ }
+ if !IsNil(o.RecordDelimiter) {
+ toSerialize["RecordDelimiter"] = o.RecordDelimiter
+ }
+ if !IsNil(o.FieldDelimiter) {
+ toSerialize["FieldDelimiter"] = o.FieldDelimiter
+ }
+ if !IsNil(o.QuoteCharacter) {
+ toSerialize["QuoteCharacter"] = o.QuoteCharacter
+ }
+ if !IsNil(o.AllowQuotedRecordDelimiter) {
+ toSerialize["AllowQuotedRecordDelimiter"] = o.AllowQuotedRecordDelimiter
+ }
+ return toSerialize, nil
+}
+
+type NullableCSVInput struct {
+ value *CSVInput
+ isSet bool
+}
+
+func (v NullableCSVInput) Get() *CSVInput {
+ return v.value
+}
+
+func (v *NullableCSVInput) Set(val *CSVInput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCSVInput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCSVInput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCSVInput(val *CSVInput) *NullableCSVInput {
+ return &NullableCSVInput{value: val, isSet: true}
+}
+
+func (v NullableCSVInput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCSVInput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_csv_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_csv_output.go
new file mode 100644
index 0000000000..366dbc8aab
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_csv_output.go
@@ -0,0 +1,279 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the CSVOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &CSVOutput{}
+
+// CSVOutput Describes how uncompressed comma-separated values (CSV)-formatted results are formatted.
+type CSVOutput struct {
+ XMLName xml.Name `xml:"CSVOutput"`
+ // Indicates whether to use quotation marks around output fields.
+ QuoteFields *string `json:"QuoteFields,omitempty" xml:"QuoteFields"`
+ // The single character used for escaping the quote character inside an already escaped value.
+ QuoteEscapeCharacter *string `json:"QuoteEscapeCharacter,omitempty" xml:"QuoteEscapeCharacter"`
+ // A single character used to separate individual records in the output. Instead of the default value, you can specify an arbitrary delimiter.
+ RecordDelimiter *string `json:"RecordDelimiter,omitempty" xml:"RecordDelimiter"`
+ // The value used to separate individual fields in a record. You can specify an arbitrary delimiter.
+ FieldDelimiter interface{} `json:"FieldDelimiter,omitempty" xml:"FieldDelimiter"`
+ // A single character used for escaping when the field delimiter is part of the value. For example, if the value is `a, b`, IONOS Object Storage wraps this field value in quotation marks, as follows: `\" a , b \"`.
+ QuoteCharacter *string `json:"QuoteCharacter,omitempty" xml:"QuoteCharacter"`
+}
+
+// NewCSVOutput instantiates a new CSVOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewCSVOutput() *CSVOutput {
+ this := CSVOutput{}
+
+ return &this
+}
+
+// NewCSVOutputWithDefaults instantiates a new CSVOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewCSVOutputWithDefaults() *CSVOutput {
+ this := CSVOutput{}
+ return &this
+}
+
+// GetQuoteFields returns the QuoteFields field value if set, zero value otherwise.
+func (o *CSVOutput) GetQuoteFields() string {
+ if o == nil || IsNil(o.QuoteFields) {
+ var ret string
+ return ret
+ }
+ return *o.QuoteFields
+}
+
+// GetQuoteFieldsOk returns a tuple with the QuoteFields field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVOutput) GetQuoteFieldsOk() (*string, bool) {
+ if o == nil || IsNil(o.QuoteFields) {
+ return nil, false
+ }
+ return o.QuoteFields, true
+}
+
+// HasQuoteFields returns a boolean if a field has been set.
+func (o *CSVOutput) HasQuoteFields() bool {
+ if o != nil && !IsNil(o.QuoteFields) {
+ return true
+ }
+
+ return false
+}
+
+// SetQuoteFields gets a reference to the given string and assigns it to the QuoteFields field.
+func (o *CSVOutput) SetQuoteFields(v string) {
+ o.QuoteFields = &v
+}
+
+// GetQuoteEscapeCharacter returns the QuoteEscapeCharacter field value if set, zero value otherwise.
+func (o *CSVOutput) GetQuoteEscapeCharacter() string {
+ if o == nil || IsNil(o.QuoteEscapeCharacter) {
+ var ret string
+ return ret
+ }
+ return *o.QuoteEscapeCharacter
+}
+
+// GetQuoteEscapeCharacterOk returns a tuple with the QuoteEscapeCharacter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVOutput) GetQuoteEscapeCharacterOk() (*string, bool) {
+ if o == nil || IsNil(o.QuoteEscapeCharacter) {
+ return nil, false
+ }
+ return o.QuoteEscapeCharacter, true
+}
+
+// HasQuoteEscapeCharacter returns a boolean if a field has been set.
+func (o *CSVOutput) HasQuoteEscapeCharacter() bool {
+ if o != nil && !IsNil(o.QuoteEscapeCharacter) {
+ return true
+ }
+
+ return false
+}
+
+// SetQuoteEscapeCharacter gets a reference to the given string and assigns it to the QuoteEscapeCharacter field.
+func (o *CSVOutput) SetQuoteEscapeCharacter(v string) {
+ o.QuoteEscapeCharacter = &v
+}
+
+// GetRecordDelimiter returns the RecordDelimiter field value if set, zero value otherwise.
+func (o *CSVOutput) GetRecordDelimiter() string {
+ if o == nil || IsNil(o.RecordDelimiter) {
+ var ret string
+ return ret
+ }
+ return *o.RecordDelimiter
+}
+
+// GetRecordDelimiterOk returns a tuple with the RecordDelimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVOutput) GetRecordDelimiterOk() (*string, bool) {
+ if o == nil || IsNil(o.RecordDelimiter) {
+ return nil, false
+ }
+ return o.RecordDelimiter, true
+}
+
+// HasRecordDelimiter returns a boolean if a field has been set.
+func (o *CSVOutput) HasRecordDelimiter() bool {
+ if o != nil && !IsNil(o.RecordDelimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetRecordDelimiter gets a reference to the given string and assigns it to the RecordDelimiter field.
+func (o *CSVOutput) SetRecordDelimiter(v string) {
+ o.RecordDelimiter = &v
+}
+
+// GetFieldDelimiter returns the FieldDelimiter field value if set, zero value otherwise (both if not set or set to explicit null).
+func (o *CSVOutput) GetFieldDelimiter() interface{} {
+ if o == nil {
+ var ret interface{}
+ return ret
+ }
+ return o.FieldDelimiter
+}
+
+// GetFieldDelimiterOk returns a tuple with the FieldDelimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
+func (o *CSVOutput) GetFieldDelimiterOk() (*interface{}, bool) {
+ if o == nil || IsNil(o.FieldDelimiter) {
+ return nil, false
+ }
+ return &o.FieldDelimiter, true
+}
+
+// HasFieldDelimiter returns a boolean if a field has been set.
+func (o *CSVOutput) HasFieldDelimiter() bool {
+ if o != nil && !IsNil(o.FieldDelimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetFieldDelimiter gets a reference to the given interface{} and assigns it to the FieldDelimiter field.
+func (o *CSVOutput) SetFieldDelimiter(v interface{}) {
+ o.FieldDelimiter = v
+}
+
+// GetQuoteCharacter returns the QuoteCharacter field value if set, zero value otherwise.
+func (o *CSVOutput) GetQuoteCharacter() string {
+ if o == nil || IsNil(o.QuoteCharacter) {
+ var ret string
+ return ret
+ }
+ return *o.QuoteCharacter
+}
+
+// GetQuoteCharacterOk returns a tuple with the QuoteCharacter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *CSVOutput) GetQuoteCharacterOk() (*string, bool) {
+ if o == nil || IsNil(o.QuoteCharacter) {
+ return nil, false
+ }
+ return o.QuoteCharacter, true
+}
+
+// HasQuoteCharacter returns a boolean if a field has been set.
+func (o *CSVOutput) HasQuoteCharacter() bool {
+ if o != nil && !IsNil(o.QuoteCharacter) {
+ return true
+ }
+
+ return false
+}
+
+// SetQuoteCharacter gets a reference to the given string and assigns it to the QuoteCharacter field.
+func (o *CSVOutput) SetQuoteCharacter(v string) {
+ o.QuoteCharacter = &v
+}
+
+func (o CSVOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o CSVOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.QuoteFields) {
+ toSerialize["QuoteFields"] = o.QuoteFields
+ }
+ if !IsNil(o.QuoteEscapeCharacter) {
+ toSerialize["QuoteEscapeCharacter"] = o.QuoteEscapeCharacter
+ }
+ if !IsNil(o.RecordDelimiter) {
+ toSerialize["RecordDelimiter"] = o.RecordDelimiter
+ }
+ if o.FieldDelimiter != nil {
+ toSerialize["FieldDelimiter"] = o.FieldDelimiter
+ }
+ if !IsNil(o.QuoteCharacter) {
+ toSerialize["QuoteCharacter"] = o.QuoteCharacter
+ }
+ return toSerialize, nil
+}
+
+type NullableCSVOutput struct {
+ value *CSVOutput
+ isSet bool
+}
+
+func (v NullableCSVOutput) Get() *CSVOutput {
+ return v.value
+}
+
+func (v *NullableCSVOutput) Set(val *CSVOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableCSVOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableCSVOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableCSVOutput(val *CSVOutput) *NullableCSVOutput {
+ return &NullableCSVOutput{value: val, isSet: true}
+}
+
+func (v NullableCSVOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableCSVOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_default_retention.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_default_retention.go
new file mode 100644
index 0000000000..a61ea1a5e1
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_default_retention.go
@@ -0,0 +1,204 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the DefaultRetention type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &DefaultRetention{}
+
+// DefaultRetention The default Object Lock retention mode and period for new objects placed in the specified bucket. Bucket settings require both a mode and a period. The period can be either `Days` or `Years` but you must select one. You cannot specify `Days` and `Years` at the same time.
+type DefaultRetention struct {
+ XMLName xml.Name `xml:"DefaultRetention"`
+ // The default Object Lock retention mode for new objects placed in the specified bucket. Must be used with either `Days` or `Years`.
+ Mode *string `json:"Mode,omitempty" xml:"Mode"`
+ // The number of days that you want to specify for the default retention period. Must be used with `Mode`.
+ Days *int32 `json:"Days,omitempty" xml:"Days"`
+ // The number of years that you want to specify for the default retention period. Must be used with `Mode`.
+ Years *int32 `json:"Years,omitempty" xml:"Years"`
+}
+
+// NewDefaultRetention instantiates a new DefaultRetention object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDefaultRetention() *DefaultRetention {
+ this := DefaultRetention{}
+
+ return &this
+}
+
+// NewDefaultRetentionWithDefaults instantiates a new DefaultRetention object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDefaultRetentionWithDefaults() *DefaultRetention {
+ this := DefaultRetention{}
+ return &this
+}
+
+// GetMode returns the Mode field value if set, zero value otherwise.
+func (o *DefaultRetention) GetMode() string {
+ if o == nil || IsNil(o.Mode) {
+ var ret string
+ return ret
+ }
+ return *o.Mode
+}
+
+// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DefaultRetention) GetModeOk() (*string, bool) {
+ if o == nil || IsNil(o.Mode) {
+ return nil, false
+ }
+ return o.Mode, true
+}
+
+// HasMode returns a boolean if a field has been set.
+func (o *DefaultRetention) HasMode() bool {
+ if o != nil && !IsNil(o.Mode) {
+ return true
+ }
+
+ return false
+}
+
+// SetMode gets a reference to the given string and assigns it to the Mode field.
+func (o *DefaultRetention) SetMode(v string) {
+ o.Mode = &v
+}
+
+// GetDays returns the Days field value if set, zero value otherwise.
+func (o *DefaultRetention) GetDays() int32 {
+ if o == nil || IsNil(o.Days) {
+ var ret int32
+ return ret
+ }
+ return *o.Days
+}
+
+// GetDaysOk returns a tuple with the Days field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DefaultRetention) GetDaysOk() (*int32, bool) {
+ if o == nil || IsNil(o.Days) {
+ return nil, false
+ }
+ return o.Days, true
+}
+
+// HasDays returns a boolean if a field has been set.
+func (o *DefaultRetention) HasDays() bool {
+ if o != nil && !IsNil(o.Days) {
+ return true
+ }
+
+ return false
+}
+
+// SetDays gets a reference to the given int32 and assigns it to the Days field.
+func (o *DefaultRetention) SetDays(v int32) {
+ o.Days = &v
+}
+
+// GetYears returns the Years field value if set, zero value otherwise.
+func (o *DefaultRetention) GetYears() int32 {
+ if o == nil || IsNil(o.Years) {
+ var ret int32
+ return ret
+ }
+ return *o.Years
+}
+
+// GetYearsOk returns a tuple with the Years field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DefaultRetention) GetYearsOk() (*int32, bool) {
+ if o == nil || IsNil(o.Years) {
+ return nil, false
+ }
+ return o.Years, true
+}
+
+// HasYears returns a boolean if a field has been set.
+func (o *DefaultRetention) HasYears() bool {
+ if o != nil && !IsNil(o.Years) {
+ return true
+ }
+
+ return false
+}
+
+// SetYears gets a reference to the given int32 and assigns it to the Years field.
+func (o *DefaultRetention) SetYears(v int32) {
+ o.Years = &v
+}
+
+func (o DefaultRetention) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o DefaultRetention) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Mode) {
+ toSerialize["Mode"] = o.Mode
+ }
+ if !IsNil(o.Days) {
+ toSerialize["Days"] = o.Days
+ }
+ if !IsNil(o.Years) {
+ toSerialize["Years"] = o.Years
+ }
+ return toSerialize, nil
+}
+
+type NullableDefaultRetention struct {
+ value *DefaultRetention
+ isSet bool
+}
+
+func (v NullableDefaultRetention) Get() *DefaultRetention {
+ return v.value
+}
+
+func (v *NullableDefaultRetention) Set(val *DefaultRetention) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDefaultRetention) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDefaultRetention) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDefaultRetention(val *DefaultRetention) *NullableDefaultRetention {
+ return &NullableDefaultRetention{value: val, isSet: true}
+}
+
+func (v NullableDefaultRetention) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDefaultRetention) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_marker_entry.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_marker_entry.go
new file mode 100644
index 0000000000..f5dbe693a1
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_marker_entry.go
@@ -0,0 +1,278 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the DeleteMarkerEntry type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &DeleteMarkerEntry{}
+
+// DeleteMarkerEntry Information about the delete marker.
+type DeleteMarkerEntry struct {
+ XMLName xml.Name `xml:"DeleteMarker"`
+ Owner *Owner `json:"Owner,omitempty" xml:"Owner"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // Version ID of the Deletion Marker
+ VersionId *string `json:"VersionId,omitempty" xml:"VersionId"`
+ // Specifies whether the object is (true) or is not (false) the latest version of an object.
+ IsLatest *bool `json:"IsLatest,omitempty" xml:"IsLatest"`
+ // Creation date of the object.
+ LastModified *IonosTime `json:"LastModified,omitempty" xml:"LastModified"`
+}
+
+// NewDeleteMarkerEntry instantiates a new DeleteMarkerEntry object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDeleteMarkerEntry() *DeleteMarkerEntry {
+ this := DeleteMarkerEntry{}
+
+ return &this
+}
+
+// NewDeleteMarkerEntryWithDefaults instantiates a new DeleteMarkerEntry object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDeleteMarkerEntryWithDefaults() *DeleteMarkerEntry {
+ this := DeleteMarkerEntry{}
+ return &this
+}
+
+// GetOwner returns the Owner field value if set, zero value otherwise.
+func (o *DeleteMarkerEntry) GetOwner() Owner {
+ if o == nil || IsNil(o.Owner) {
+ var ret Owner
+ return ret
+ }
+ return *o.Owner
+}
+
+// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteMarkerEntry) GetOwnerOk() (*Owner, bool) {
+ if o == nil || IsNil(o.Owner) {
+ return nil, false
+ }
+ return o.Owner, true
+}
+
+// HasOwner returns a boolean if a field has been set.
+func (o *DeleteMarkerEntry) HasOwner() bool {
+ if o != nil && !IsNil(o.Owner) {
+ return true
+ }
+
+ return false
+}
+
+// SetOwner gets a reference to the given Owner and assigns it to the Owner field.
+func (o *DeleteMarkerEntry) SetOwner(v Owner) {
+ o.Owner = &v
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *DeleteMarkerEntry) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteMarkerEntry) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *DeleteMarkerEntry) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *DeleteMarkerEntry) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetVersionId returns the VersionId field value if set, zero value otherwise.
+func (o *DeleteMarkerEntry) GetVersionId() string {
+ if o == nil || IsNil(o.VersionId) {
+ var ret string
+ return ret
+ }
+ return *o.VersionId
+}
+
+// GetVersionIdOk returns a tuple with the VersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteMarkerEntry) GetVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.VersionId) {
+ return nil, false
+ }
+ return o.VersionId, true
+}
+
+// HasVersionId returns a boolean if a field has been set.
+func (o *DeleteMarkerEntry) HasVersionId() bool {
+ if o != nil && !IsNil(o.VersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersionId gets a reference to the given string and assigns it to the VersionId field.
+func (o *DeleteMarkerEntry) SetVersionId(v string) {
+ o.VersionId = &v
+}
+
+// GetIsLatest returns the IsLatest field value if set, zero value otherwise.
+func (o *DeleteMarkerEntry) GetIsLatest() bool {
+ if o == nil || IsNil(o.IsLatest) {
+ var ret bool
+ return ret
+ }
+ return *o.IsLatest
+}
+
+// GetIsLatestOk returns a tuple with the IsLatest field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteMarkerEntry) GetIsLatestOk() (*bool, bool) {
+ if o == nil || IsNil(o.IsLatest) {
+ return nil, false
+ }
+ return o.IsLatest, true
+}
+
+// HasIsLatest returns a boolean if a field has been set.
+func (o *DeleteMarkerEntry) HasIsLatest() bool {
+ if o != nil && !IsNil(o.IsLatest) {
+ return true
+ }
+
+ return false
+}
+
+// SetIsLatest gets a reference to the given bool and assigns it to the IsLatest field.
+func (o *DeleteMarkerEntry) SetIsLatest(v bool) {
+ o.IsLatest = &v
+}
+
+// GetLastModified returns the LastModified field value if set, zero value otherwise.
+func (o *DeleteMarkerEntry) GetLastModified() time.Time {
+ if o == nil || IsNil(o.LastModified) {
+ var ret time.Time
+ return ret
+ }
+ return o.LastModified.Time
+}
+
+// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteMarkerEntry) GetLastModifiedOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.LastModified) {
+ return nil, false
+ }
+ return &o.LastModified.Time, true
+}
+
+// HasLastModified returns a boolean if a field has been set.
+func (o *DeleteMarkerEntry) HasLastModified() bool {
+ if o != nil && !IsNil(o.LastModified) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastModified gets a reference to the given time.Time and assigns it to the LastModified field.
+func (o *DeleteMarkerEntry) SetLastModified(v time.Time) {
+ o.LastModified = &IonosTime{v}
+}
+
+func (o DeleteMarkerEntry) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o DeleteMarkerEntry) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Owner) {
+ toSerialize["Owner"] = o.Owner
+ }
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.VersionId) {
+ toSerialize["VersionId"] = o.VersionId
+ }
+ if !IsNil(o.IsLatest) {
+ toSerialize["IsLatest"] = o.IsLatest
+ }
+ if !IsNil(o.LastModified) {
+ toSerialize["LastModified"] = o.LastModified
+ }
+ return toSerialize, nil
+}
+
+type NullableDeleteMarkerEntry struct {
+ value *DeleteMarkerEntry
+ isSet bool
+}
+
+func (v NullableDeleteMarkerEntry) Get() *DeleteMarkerEntry {
+ return v.value
+}
+
+func (v *NullableDeleteMarkerEntry) Set(val *DeleteMarkerEntry) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDeleteMarkerEntry) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDeleteMarkerEntry) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDeleteMarkerEntry(val *DeleteMarkerEntry) *NullableDeleteMarkerEntry {
+ return &NullableDeleteMarkerEntry{value: val, isSet: true}
+}
+
+func (v NullableDeleteMarkerEntry) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDeleteMarkerEntry) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_objects_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_objects_output.go
new file mode 100644
index 0000000000..b2c23322b7
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_objects_output.go
@@ -0,0 +1,166 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the DeleteObjectsOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &DeleteObjectsOutput{}
+
+// DeleteObjectsOutput struct for DeleteObjectsOutput
+type DeleteObjectsOutput struct {
+ XMLName xml.Name `xml:"DeleteResult"`
+ // Container element for a successful delete. It identifies the object that was successfully deleted.
+ Deleted []DeletedObject `json:"Deleted,omitempty" xml:"Deleted"`
+ Errors []DeletionError `json:"Errors,omitempty" xml:"Error"`
+}
+
+// NewDeleteObjectsOutput instantiates a new DeleteObjectsOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDeleteObjectsOutput() *DeleteObjectsOutput {
+ this := DeleteObjectsOutput{}
+
+ return &this
+}
+
+// NewDeleteObjectsOutputWithDefaults instantiates a new DeleteObjectsOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDeleteObjectsOutputWithDefaults() *DeleteObjectsOutput {
+ this := DeleteObjectsOutput{}
+ return &this
+}
+
+// GetDeleted returns the Deleted field value if set, zero value otherwise.
+func (o *DeleteObjectsOutput) GetDeleted() []DeletedObject {
+ if o == nil || IsNil(o.Deleted) {
+ var ret []DeletedObject
+ return ret
+ }
+ return o.Deleted
+}
+
+// GetDeletedOk returns a tuple with the Deleted field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteObjectsOutput) GetDeletedOk() ([]DeletedObject, bool) {
+ if o == nil || IsNil(o.Deleted) {
+ return nil, false
+ }
+ return o.Deleted, true
+}
+
+// HasDeleted returns a boolean if a field has been set.
+func (o *DeleteObjectsOutput) HasDeleted() bool {
+ if o != nil && !IsNil(o.Deleted) {
+ return true
+ }
+
+ return false
+}
+
+// SetDeleted gets a reference to the given []DeletedObject and assigns it to the Deleted field.
+func (o *DeleteObjectsOutput) SetDeleted(v []DeletedObject) {
+ o.Deleted = v
+}
+
+// GetErrors returns the Errors field value if set, zero value otherwise.
+func (o *DeleteObjectsOutput) GetErrors() []DeletionError {
+ if o == nil || IsNil(o.Errors) {
+ var ret []DeletionError
+ return ret
+ }
+ return o.Errors
+}
+
+// GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteObjectsOutput) GetErrorsOk() ([]DeletionError, bool) {
+ if o == nil || IsNil(o.Errors) {
+ return nil, false
+ }
+ return o.Errors, true
+}
+
+// HasErrors returns a boolean if a field has been set.
+func (o *DeleteObjectsOutput) HasErrors() bool {
+ if o != nil && !IsNil(o.Errors) {
+ return true
+ }
+
+ return false
+}
+
+// SetErrors gets a reference to the given []DeletionError and assigns it to the Errors field.
+func (o *DeleteObjectsOutput) SetErrors(v []DeletionError) {
+ o.Errors = v
+}
+
+func (o DeleteObjectsOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o DeleteObjectsOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Deleted) {
+ toSerialize["Deleted"] = o.Deleted
+ }
+ if !IsNil(o.Errors) {
+ toSerialize["Errors"] = o.Errors
+ }
+ return toSerialize, nil
+}
+
+type NullableDeleteObjectsOutput struct {
+ value *DeleteObjectsOutput
+ isSet bool
+}
+
+func (v NullableDeleteObjectsOutput) Get() *DeleteObjectsOutput {
+ return v.value
+}
+
+func (v *NullableDeleteObjectsOutput) Set(val *DeleteObjectsOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDeleteObjectsOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDeleteObjectsOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDeleteObjectsOutput(val *DeleteObjectsOutput) *NullableDeleteObjectsOutput {
+ return &NullableDeleteObjectsOutput{value: val, isSet: true}
+}
+
+func (v NullableDeleteObjectsOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDeleteObjectsOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_objects_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_objects_request.go
new file mode 100644
index 0000000000..c50a0d3299
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_delete_objects_request.go
@@ -0,0 +1,166 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the DeleteObjectsRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &DeleteObjectsRequest{}
+
+// DeleteObjectsRequest Container for the objects to delete.
+type DeleteObjectsRequest struct {
+ XMLName xml.Name `xml:"Delete"`
+ // The objects to delete.
+ Objects []ObjectIdentifier `json:"Objects,omitempty" xml:"Object"`
+ Quiet *bool `json:"Quiet,omitempty" xml:"Quiet"`
+}
+
+// NewDeleteObjectsRequest instantiates a new DeleteObjectsRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDeleteObjectsRequest() *DeleteObjectsRequest {
+ this := DeleteObjectsRequest{}
+
+ return &this
+}
+
+// NewDeleteObjectsRequestWithDefaults instantiates a new DeleteObjectsRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDeleteObjectsRequestWithDefaults() *DeleteObjectsRequest {
+ this := DeleteObjectsRequest{}
+ return &this
+}
+
+// GetObjects returns the Objects field value if set, zero value otherwise.
+func (o *DeleteObjectsRequest) GetObjects() []ObjectIdentifier {
+ if o == nil || IsNil(o.Objects) {
+ var ret []ObjectIdentifier
+ return ret
+ }
+ return o.Objects
+}
+
+// GetObjectsOk returns a tuple with the Objects field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteObjectsRequest) GetObjectsOk() ([]ObjectIdentifier, bool) {
+ if o == nil || IsNil(o.Objects) {
+ return nil, false
+ }
+ return o.Objects, true
+}
+
+// HasObjects returns a boolean if a field has been set.
+func (o *DeleteObjectsRequest) HasObjects() bool {
+ if o != nil && !IsNil(o.Objects) {
+ return true
+ }
+
+ return false
+}
+
+// SetObjects gets a reference to the given []ObjectIdentifier and assigns it to the Objects field.
+func (o *DeleteObjectsRequest) SetObjects(v []ObjectIdentifier) {
+ o.Objects = v
+}
+
+// GetQuiet returns the Quiet field value if set, zero value otherwise.
+func (o *DeleteObjectsRequest) GetQuiet() bool {
+ if o == nil || IsNil(o.Quiet) {
+ var ret bool
+ return ret
+ }
+ return *o.Quiet
+}
+
+// GetQuietOk returns a tuple with the Quiet field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeleteObjectsRequest) GetQuietOk() (*bool, bool) {
+ if o == nil || IsNil(o.Quiet) {
+ return nil, false
+ }
+ return o.Quiet, true
+}
+
+// HasQuiet returns a boolean if a field has been set.
+func (o *DeleteObjectsRequest) HasQuiet() bool {
+ if o != nil && !IsNil(o.Quiet) {
+ return true
+ }
+
+ return false
+}
+
+// SetQuiet gets a reference to the given bool and assigns it to the Quiet field.
+func (o *DeleteObjectsRequest) SetQuiet(v bool) {
+ o.Quiet = &v
+}
+
+func (o DeleteObjectsRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o DeleteObjectsRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Objects) {
+ toSerialize["Objects"] = o.Objects
+ }
+ if !IsNil(o.Quiet) {
+ toSerialize["Quiet"] = o.Quiet
+ }
+ return toSerialize, nil
+}
+
+type NullableDeleteObjectsRequest struct {
+ value *DeleteObjectsRequest
+ isSet bool
+}
+
+func (v NullableDeleteObjectsRequest) Get() *DeleteObjectsRequest {
+ return v.value
+}
+
+func (v *NullableDeleteObjectsRequest) Set(val *DeleteObjectsRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDeleteObjectsRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDeleteObjectsRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDeleteObjectsRequest(val *DeleteObjectsRequest) *NullableDeleteObjectsRequest {
+ return &NullableDeleteObjectsRequest{value: val, isSet: true}
+}
+
+func (v NullableDeleteObjectsRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDeleteObjectsRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_deleted_object.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_deleted_object.go
new file mode 100644
index 0000000000..be2503ac2f
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_deleted_object.go
@@ -0,0 +1,241 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the DeletedObject type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &DeletedObject{}
+
+// DeletedObject Information about the deleted object.
+type DeletedObject struct {
+ XMLName xml.Name `xml:"Deleted"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // Version ID of the deleted object
+ VersionId *string `json:"VersionId,omitempty" xml:"VersionId"`
+ // Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker. In a simple DELETE, this header indicates whether (true) or not (false) a delete marker was created.
+ DeleteMarker *bool `json:"DeleteMarker,omitempty" xml:"DeleteMarker"`
+ // The version ID of the delete marker created as a result of the DELETE operation. If you delete a specific object version, the value returned by this header is the version ID of the object version deleted.
+ DeleteMarkerVersionId *string `json:"DeleteMarkerVersionId,omitempty" xml:"DeleteMarkerVersionId"`
+}
+
+// NewDeletedObject instantiates a new DeletedObject object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDeletedObject() *DeletedObject {
+ this := DeletedObject{}
+
+ return &this
+}
+
+// NewDeletedObjectWithDefaults instantiates a new DeletedObject object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDeletedObjectWithDefaults() *DeletedObject {
+ this := DeletedObject{}
+ return &this
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *DeletedObject) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeletedObject) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *DeletedObject) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *DeletedObject) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetVersionId returns the VersionId field value if set, zero value otherwise.
+func (o *DeletedObject) GetVersionId() string {
+ if o == nil || IsNil(o.VersionId) {
+ var ret string
+ return ret
+ }
+ return *o.VersionId
+}
+
+// GetVersionIdOk returns a tuple with the VersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeletedObject) GetVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.VersionId) {
+ return nil, false
+ }
+ return o.VersionId, true
+}
+
+// HasVersionId returns a boolean if a field has been set.
+func (o *DeletedObject) HasVersionId() bool {
+ if o != nil && !IsNil(o.VersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersionId gets a reference to the given string and assigns it to the VersionId field.
+func (o *DeletedObject) SetVersionId(v string) {
+ o.VersionId = &v
+}
+
+// GetDeleteMarker returns the DeleteMarker field value if set, zero value otherwise.
+func (o *DeletedObject) GetDeleteMarker() bool {
+ if o == nil || IsNil(o.DeleteMarker) {
+ var ret bool
+ return ret
+ }
+ return *o.DeleteMarker
+}
+
+// GetDeleteMarkerOk returns a tuple with the DeleteMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeletedObject) GetDeleteMarkerOk() (*bool, bool) {
+ if o == nil || IsNil(o.DeleteMarker) {
+ return nil, false
+ }
+ return o.DeleteMarker, true
+}
+
+// HasDeleteMarker returns a boolean if a field has been set.
+func (o *DeletedObject) HasDeleteMarker() bool {
+ if o != nil && !IsNil(o.DeleteMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetDeleteMarker gets a reference to the given bool and assigns it to the DeleteMarker field.
+func (o *DeletedObject) SetDeleteMarker(v bool) {
+ o.DeleteMarker = &v
+}
+
+// GetDeleteMarkerVersionId returns the DeleteMarkerVersionId field value if set, zero value otherwise.
+func (o *DeletedObject) GetDeleteMarkerVersionId() string {
+ if o == nil || IsNil(o.DeleteMarkerVersionId) {
+ var ret string
+ return ret
+ }
+ return *o.DeleteMarkerVersionId
+}
+
+// GetDeleteMarkerVersionIdOk returns a tuple with the DeleteMarkerVersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeletedObject) GetDeleteMarkerVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.DeleteMarkerVersionId) {
+ return nil, false
+ }
+ return o.DeleteMarkerVersionId, true
+}
+
+// HasDeleteMarkerVersionId returns a boolean if a field has been set.
+func (o *DeletedObject) HasDeleteMarkerVersionId() bool {
+ if o != nil && !IsNil(o.DeleteMarkerVersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetDeleteMarkerVersionId gets a reference to the given string and assigns it to the DeleteMarkerVersionId field.
+func (o *DeletedObject) SetDeleteMarkerVersionId(v string) {
+ o.DeleteMarkerVersionId = &v
+}
+
+func (o DeletedObject) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o DeletedObject) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.VersionId) {
+ toSerialize["VersionId"] = o.VersionId
+ }
+ if !IsNil(o.DeleteMarker) {
+ toSerialize["DeleteMarker"] = o.DeleteMarker
+ }
+ if !IsNil(o.DeleteMarkerVersionId) {
+ toSerialize["DeleteMarkerVersionId"] = o.DeleteMarkerVersionId
+ }
+ return toSerialize, nil
+}
+
+type NullableDeletedObject struct {
+ value *DeletedObject
+ isSet bool
+}
+
+func (v NullableDeletedObject) Get() *DeletedObject {
+ return v.value
+}
+
+func (v *NullableDeletedObject) Set(val *DeletedObject) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDeletedObject) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDeletedObject) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDeletedObject(val *DeletedObject) *NullableDeletedObject {
+ return &NullableDeletedObject{value: val, isSet: true}
+}
+
+func (v NullableDeletedObject) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDeletedObject) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_deletion_error.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_deletion_error.go
new file mode 100644
index 0000000000..0f47307cdd
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_deletion_error.go
@@ -0,0 +1,239 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the DeletionError type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &DeletionError{}
+
+// DeletionError Container for all error elements.
+type DeletionError struct {
+ XMLName xml.Name `xml:"Error"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // The version ID of the object.
+ VersionId *string `json:"VersionId,omitempty" xml:"VersionId"`
+ Code *string `json:"Code,omitempty" xml:"Code"`
+ Message *string `json:"Message,omitempty" xml:"Message"`
+}
+
+// NewDeletionError instantiates a new DeletionError object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDeletionError() *DeletionError {
+ this := DeletionError{}
+
+ return &this
+}
+
+// NewDeletionErrorWithDefaults instantiates a new DeletionError object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDeletionErrorWithDefaults() *DeletionError {
+ this := DeletionError{}
+ return &this
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *DeletionError) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeletionError) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *DeletionError) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *DeletionError) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetVersionId returns the VersionId field value if set, zero value otherwise.
+func (o *DeletionError) GetVersionId() string {
+ if o == nil || IsNil(o.VersionId) {
+ var ret string
+ return ret
+ }
+ return *o.VersionId
+}
+
+// GetVersionIdOk returns a tuple with the VersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeletionError) GetVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.VersionId) {
+ return nil, false
+ }
+ return o.VersionId, true
+}
+
+// HasVersionId returns a boolean if a field has been set.
+func (o *DeletionError) HasVersionId() bool {
+ if o != nil && !IsNil(o.VersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersionId gets a reference to the given string and assigns it to the VersionId field.
+func (o *DeletionError) SetVersionId(v string) {
+ o.VersionId = &v
+}
+
+// GetCode returns the Code field value if set, zero value otherwise.
+func (o *DeletionError) GetCode() string {
+ if o == nil || IsNil(o.Code) {
+ var ret string
+ return ret
+ }
+ return *o.Code
+}
+
+// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeletionError) GetCodeOk() (*string, bool) {
+ if o == nil || IsNil(o.Code) {
+ return nil, false
+ }
+ return o.Code, true
+}
+
+// HasCode returns a boolean if a field has been set.
+func (o *DeletionError) HasCode() bool {
+ if o != nil && !IsNil(o.Code) {
+ return true
+ }
+
+ return false
+}
+
+// SetCode gets a reference to the given string and assigns it to the Code field.
+func (o *DeletionError) SetCode(v string) {
+ o.Code = &v
+}
+
+// GetMessage returns the Message field value if set, zero value otherwise.
+func (o *DeletionError) GetMessage() string {
+ if o == nil || IsNil(o.Message) {
+ var ret string
+ return ret
+ }
+ return *o.Message
+}
+
+// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *DeletionError) GetMessageOk() (*string, bool) {
+ if o == nil || IsNil(o.Message) {
+ return nil, false
+ }
+ return o.Message, true
+}
+
+// HasMessage returns a boolean if a field has been set.
+func (o *DeletionError) HasMessage() bool {
+ if o != nil && !IsNil(o.Message) {
+ return true
+ }
+
+ return false
+}
+
+// SetMessage gets a reference to the given string and assigns it to the Message field.
+func (o *DeletionError) SetMessage(v string) {
+ o.Message = &v
+}
+
+func (o DeletionError) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o DeletionError) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.VersionId) {
+ toSerialize["VersionId"] = o.VersionId
+ }
+ if !IsNil(o.Code) {
+ toSerialize["Code"] = o.Code
+ }
+ if !IsNil(o.Message) {
+ toSerialize["Message"] = o.Message
+ }
+ return toSerialize, nil
+}
+
+type NullableDeletionError struct {
+ value *DeletionError
+ isSet bool
+}
+
+func (v NullableDeletionError) Get() *DeletionError {
+ return v.value
+}
+
+func (v *NullableDeletionError) Set(val *DeletionError) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDeletionError) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDeletionError) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDeletionError(val *DeletionError) *NullableDeletionError {
+ return &NullableDeletionError{value: val, isSet: true}
+}
+
+func (v NullableDeletionError) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDeletionError) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_destination.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_destination.go
new file mode 100644
index 0000000000..0226e26eaf
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_destination.go
@@ -0,0 +1,158 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Destination type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Destination{}
+
+// Destination A container for information about the replication destination.
+type Destination struct {
+ XMLName xml.Name `xml:"Destination"`
+ // Use the same \"Bucket\" value formatting as in the S3 API specification, that is, `arn:aws:s3:::{Bucket}`.
+ Bucket string `json:"Bucket" xml:"Bucket"`
+ StorageClass *StorageClass `json:"StorageClass,omitempty" xml:"StorageClass"`
+}
+
+// NewDestination instantiates a new Destination object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewDestination(bucket string) *Destination {
+ this := Destination{}
+
+ this.Bucket = bucket
+
+ return &this
+}
+
+// NewDestinationWithDefaults instantiates a new Destination object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewDestinationWithDefaults() *Destination {
+ this := Destination{}
+ return &this
+}
+
+// GetBucket returns the Bucket field value
+func (o *Destination) GetBucket() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Bucket
+}
+
+// GetBucketOk returns a tuple with the Bucket field value
+// and a boolean to check if the value has been set.
+func (o *Destination) GetBucketOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Bucket, true
+}
+
+// SetBucket sets field value
+func (o *Destination) SetBucket(v string) {
+ o.Bucket = v
+}
+
+// GetStorageClass returns the StorageClass field value if set, zero value otherwise.
+func (o *Destination) GetStorageClass() StorageClass {
+ if o == nil || IsNil(o.StorageClass) {
+ var ret StorageClass
+ return ret
+ }
+ return *o.StorageClass
+}
+
+// GetStorageClassOk returns a tuple with the StorageClass field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Destination) GetStorageClassOk() (*StorageClass, bool) {
+ if o == nil || IsNil(o.StorageClass) {
+ return nil, false
+ }
+ return o.StorageClass, true
+}
+
+// HasStorageClass returns a boolean if a field has been set.
+func (o *Destination) HasStorageClass() bool {
+ if o != nil && !IsNil(o.StorageClass) {
+ return true
+ }
+
+ return false
+}
+
+// SetStorageClass gets a reference to the given StorageClass and assigns it to the StorageClass field.
+func (o *Destination) SetStorageClass(v StorageClass) {
+ o.StorageClass = &v
+}
+
+func (o Destination) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Destination) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Bucket"] = o.Bucket
+ if !IsNil(o.StorageClass) {
+ toSerialize["StorageClass"] = o.StorageClass
+ }
+ return toSerialize, nil
+}
+
+type NullableDestination struct {
+ value *Destination
+ isSet bool
+}
+
+func (v NullableDestination) Get() *Destination {
+ return v.value
+}
+
+func (v *NullableDestination) Set(val *Destination) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableDestination) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableDestination) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableDestination(val *Destination) *NullableDestination {
+ return &NullableDestination{value: val, isSet: true}
+}
+
+func (v NullableDestination) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableDestination) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_encoding_type.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_encoding_type.go
new file mode 100644
index 0000000000..a1fe918aa3
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_encoding_type.go
@@ -0,0 +1,83 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// EncodingType Encoding type used by IONOS Object Storage to encode object key names in the XML response. If you specify encoding-type request parameter, IONOS Object Storage includes this element in the response, and returns encoded key name values in the following response elements: `KeyMarker`, `NextKeyMarker`, `Prefix`, `Key`, and `Delimiter`.
+type EncodingType string
+
+// List of EncodingType
+const (
+ ENCODINGTYPE_URL EncodingType = "url"
+)
+
+func (v *EncodingType) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := EncodingType(value)
+ for _, existing := range []EncodingType{"url"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid EncodingType", value)
+}
+
+// Ptr returns reference to EncodingType value
+func (v EncodingType) Ptr() *EncodingType {
+ return &v
+}
+
+type NullableEncodingType struct {
+ value *EncodingType
+ isSet bool
+}
+
+func (v NullableEncodingType) Get() *EncodingType {
+ return v.value
+}
+
+func (v *NullableEncodingType) Set(val *EncodingType) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableEncodingType) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableEncodingType) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableEncodingType(val *EncodingType) *NullableEncodingType {
+ return &NullableEncodingType{value: val, isSet: true}
+}
+
+func (v NullableEncodingType) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableEncodingType) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_encryption.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_encryption.go
new file mode 100644
index 0000000000..919eb3396a
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_encryption.go
@@ -0,0 +1,122 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Encryption type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Encryption{}
+
+// Encryption struct for Encryption
+type Encryption struct {
+ XMLName xml.Name `xml:"Encryption"`
+ // The server-side encryption algorithm used when storing job results in IONOS Object Storage (AES256).
+ EncryptionType string `json:"EncryptionType" xml:"EncryptionType"`
+}
+
+// NewEncryption instantiates a new Encryption object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewEncryption(encryptionType string) *Encryption {
+ this := Encryption{}
+
+ this.EncryptionType = encryptionType
+
+ return &this
+}
+
+// NewEncryptionWithDefaults instantiates a new Encryption object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewEncryptionWithDefaults() *Encryption {
+ this := Encryption{}
+ return &this
+}
+
+// GetEncryptionType returns the EncryptionType field value
+func (o *Encryption) GetEncryptionType() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.EncryptionType
+}
+
+// GetEncryptionTypeOk returns a tuple with the EncryptionType field value
+// and a boolean to check if the value has been set.
+func (o *Encryption) GetEncryptionTypeOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.EncryptionType, true
+}
+
+// SetEncryptionType sets field value
+func (o *Encryption) SetEncryptionType(v string) {
+ o.EncryptionType = v
+}
+
+func (o Encryption) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Encryption) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["EncryptionType"] = o.EncryptionType
+ return toSerialize, nil
+}
+
+type NullableEncryption struct {
+ value *Encryption
+ isSet bool
+}
+
+func (v NullableEncryption) Get() *Encryption {
+ return v.value
+}
+
+func (v *NullableEncryption) Set(val *Encryption) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableEncryption) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableEncryption) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableEncryption(val *Encryption) *NullableEncryption {
+ return &NullableEncryption{value: val, isSet: true}
+}
+
+func (v NullableEncryption) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableEncryption) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_error.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_error.go
new file mode 100644
index 0000000000..b58bb9be27
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_error.go
@@ -0,0 +1,239 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Error type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Error{}
+
+// Error Container for all error elements.
+type Error struct {
+ XMLName xml.Name `xml:"Error"`
+ // The error code is a string that uniquely identifies an error condition. It is meant to be read and understood by programs that detect and handle errors by type. ## IONOS Object Storage error codes - AccessDenied - Description: Access Denied - HTTPStatus Code: 403 Forbidden - AccountProblem - Description: There is a problem with your IONOS Object Storage account that prevents the operation from completing successfully. Contact IONOS for further assistance. - HTTP Status Code: 403 Forbidden - AmbiguousGrantByEmailAddress - Description: The email address you provided is associated with more than one account. - HTTP Status Code: 400 Bad Request - BadDigest - Description: The Content-MD5 you specified did not match what we received. - HTTP Status Code: 400 Bad Request - BucketAlreadyExists - Description: The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. - HTTP Status Code: 409 Conflict - BucketAlreadyOwnedByYou - Description: The bucket you tried to create already exists, and you own it. - HTTP Code: 409 Conflict - BucketNotEmpty - Description: The bucket you tried to delete is not empty. - HTTP Status Code: 409 Conflict - CrossLocationLoggingProhibited - Description: Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. - HTTP Status Code: 403 Forbidden - EntityTooSmall - Description: Your proposed upload is smaller than the minimum allowed object size. - HTTP Status Code: 400 Bad Request - EntityTooLarge - Description: Your proposed upload exceeds the maximum allowed object size. - HTTP Status Code: 400 Bad Request - IllegalVersioningConfigurationException - Description: Indicates that the versioning configuration specified in the request is invalid. - HTTP Status Code: 400 Bad Request - IncorrectNumberOfFilesInPostRequest - Description: POST requires exactly one file upload per request. - HTTP Status Code: 400 Bad Request - InternalError - Description: We encountered an internal error. Please try again. - HTTP Status Code: 500 Internal Server Error - InvalidAccessKeyId - Description: The IONOS Object Storage access key ID you provided does not exist in our records. - HTTP Status Code: 403 Forbidden - InvalidArgument - Description: Invalid Argument - HTTP Status Code: 400 Bad Request - InvalidBucketName - Description: The specified bucket is not valid. - HTTP Status Code: 400 Bad Request - InvalidBucketState - Description: The request is not valid with the current state of the bucket. - HTTP Status Code: 409 Conflict - InvalidDigest - Description: The Content-MD5 you specified is not valid. - HTTP Status Code: 400 Bad Request - InvalidEncryptionAlgorithmError - Description: The encryption request you specified is not valid. The valid value is AES256. - HTTP Status Code: 400 Bad Request - InvalidLocationConstraint - HTTP Status Code: 400 Bad Request - InvalidObjectState - Description: The operation is not valid for the current state of the object. - HTTP Status Code: 403 Forbidden - InvalidPart - Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. - HTTP Status Code: 400 Bad Request - InvalidPartOrder - Description: The list of parts was not in ascending order. Parts list must be specified in order by part number. - HTTP Status Code: 400 Bad Request - InvalidPolicyDocument - Description: The content of the form does not meet the conditions specified in the policy document. - HTTP Status Code: 400 Bad Request - InvalidRange - Description: The requested range cannot be satisfied. - HTTP Status Code: 416 Requested Range Not Satisfiable - InvalidRequest - Description: Please use `AWS4-HMAC-SHA256`. - HTTP Status Code: 400 Bad Request - InvalidSecurity - Description: The provided security credentials are not valid. - HTTP Status Code: 403 Forbidden - InvalidTargetBucketForLogging - Description: The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. - Status Code: 400 Bad Request - InvalidURI - Description: Couldn't parse the specified URI. - HTTP Status Code: 400 Bad Request - KeyTooLong - Description: Your key is too long. - HTTP Status Code: 400 Bad Request - MalformedACLError - Description: The XML you provided was not well-formed or did not validate against our published schema. - HTTP Status Code: 400 Bad Request - MalformedPOSTRequest - Description: The body of your POST request is not well-formed multipart/form-data. - HTTP Status Code: 400 Bad Request - MalformedXML - Description: This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, \"The XML you provided was not well-formed or did not validate against our published schema.\" - HTTP Status Code: 400 Bad Request - MaxMessageLengthExceeded - Description: Your request was too big. - HTTP Status Code: 400 Bad Request - MaxPostPreDataLengthExceededError - Description: Your POST request fields preceding the upload file were too large. - HTTP Status Code: 400 Bad Request - MetadataTooLarge - Description: Your metadata headers exceed the maximum allowed metadata size. - HTTP Status Code: 400 Bad Request - MethodNotAllowed - Description: The specified method is not allowed against this resource. - HTTP Status Code: 405 Method Not Allowed - MissingContentLength - Description: You must provide the Content-Length HTTP header. - HTTP Status Code: 411 Length Required - MissingSecurityHeader - Description: Your request is missing a required header. - HTTP Status Code: 400 Bad Request - NoSuchBucket - Description: The specified bucket does not exist. - HTTP Status Code: 404 Not Found - NoSuchBucketPolicy - Description: The specified bucket does not have a bucket policy. - HTTP Status Code: 404 Not Found - NoSuchKey - Description: The specified key does not exist. - HTTP Status Code:404 Not Found - NoSuchLifecycleConfiguration - Description: The lifecycle configuration does not exist. - HTTP Status Code: 404 Not Found - NoSuchReplicationConfiguration - Description: The replication configuration does not exist. - HTTP Status Code: 404 Not Found - NoSuchUpload - Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. - HTTP Status Code: 404 Not Found - NoSuchVersion - Description: Indicates that the version ID specified in the request does not match an existing version. - HTTP Status Code: 404 Not Found - NotImplemented - Description: A header you provided implies functionality that is not implemented. - HTTP Status Code: 501 Not Implemented - PermanentRedirect - Description: The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. - HTTP Status Code: 301 Moved Permanently - PreconditionFailed - Description: At least one of the preconditions you specified did not hold. - HTTP Status Code: 412 Precondition Failed - Redirect - Description: Temporary redirect. - HTTP Status Code: 307 Moved Temporarily - RestoreAlreadyInProgress - Description: Object restore is already in progress. - HTTP Status Code: 409 Conflict - RequestIsNotMultiPartContent - Description: Bucket POST must be of the enclosure-type multipart/form-data. - HTTP Status Code: 400 Bad Request - RequestTimeout - Description: Your socket connection to the server was not read from or written to within the timeout period. - HTTP Status Code: 400 Bad Request - RequestTimeTooSkewed - Description: The difference between the request time and the server's time is too large. - HTTP Status Code: 403 Forbidden - SignatureDoesNotMatch - HTTP Status Code: 403 Forbidden - ServiceUnavailable - Description: Reduce your request rate. - HTTP Status Code: 503 Service Unavailable - SlowDown - Description: Reduce your request rate. - HTTP Status Code: 503 Slow Down - TemporaryRedirect - Description: You are being redirected to the bucket while DNS updates. - HTTP Status Code: 307 Moved Temporarily - TooManyBuckets - Description: You have attempted to create more buckets than allowed. - HTTP Status Code: 400 Bad Request - UnexpectedContent - Description: This request does not support content. - HTTP Status Code: 400 Bad Request - UnresolvableGrantByEmailAddress - Description: The email address you provided does not match any account on record. - HTTP Status Code: 400 Bad Request - UserKeyMustBeSpecified - Description: The bucket POST must contain the specified field name. If it is specified, check the order of the fields. - HTTP Status Code: 400 Bad Request
+ Code *string `json:"Code,omitempty" xml:"Code"`
+ // Gives a brief English description of the issue.
+ Message *string `json:"Message,omitempty" xml:"Message"`
+ RequestId *string `json:"RequestId,omitempty" xml:"RequestId"`
+ HostId *string `json:"HostId,omitempty" xml:"HostId"`
+}
+
+// NewError instantiates a new Error object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewError() *Error {
+ this := Error{}
+
+ return &this
+}
+
+// NewErrorWithDefaults instantiates a new Error object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewErrorWithDefaults() *Error {
+ this := Error{}
+ return &this
+}
+
+// GetCode returns the Code field value if set, zero value otherwise.
+func (o *Error) GetCode() string {
+ if o == nil || IsNil(o.Code) {
+ var ret string
+ return ret
+ }
+ return *o.Code
+}
+
+// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Error) GetCodeOk() (*string, bool) {
+ if o == nil || IsNil(o.Code) {
+ return nil, false
+ }
+ return o.Code, true
+}
+
+// HasCode returns a boolean if a field has been set.
+func (o *Error) HasCode() bool {
+ if o != nil && !IsNil(o.Code) {
+ return true
+ }
+
+ return false
+}
+
+// SetCode gets a reference to the given string and assigns it to the Code field.
+func (o *Error) SetCode(v string) {
+ o.Code = &v
+}
+
+// GetMessage returns the Message field value if set, zero value otherwise.
+func (o *Error) GetMessage() string {
+ if o == nil || IsNil(o.Message) {
+ var ret string
+ return ret
+ }
+ return *o.Message
+}
+
+// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Error) GetMessageOk() (*string, bool) {
+ if o == nil || IsNil(o.Message) {
+ return nil, false
+ }
+ return o.Message, true
+}
+
+// HasMessage returns a boolean if a field has been set.
+func (o *Error) HasMessage() bool {
+ if o != nil && !IsNil(o.Message) {
+ return true
+ }
+
+ return false
+}
+
+// SetMessage gets a reference to the given string and assigns it to the Message field.
+func (o *Error) SetMessage(v string) {
+ o.Message = &v
+}
+
+// GetRequestId returns the RequestId field value if set, zero value otherwise.
+func (o *Error) GetRequestId() string {
+ if o == nil || IsNil(o.RequestId) {
+ var ret string
+ return ret
+ }
+ return *o.RequestId
+}
+
+// GetRequestIdOk returns a tuple with the RequestId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Error) GetRequestIdOk() (*string, bool) {
+ if o == nil || IsNil(o.RequestId) {
+ return nil, false
+ }
+ return o.RequestId, true
+}
+
+// HasRequestId returns a boolean if a field has been set.
+func (o *Error) HasRequestId() bool {
+ if o != nil && !IsNil(o.RequestId) {
+ return true
+ }
+
+ return false
+}
+
+// SetRequestId gets a reference to the given string and assigns it to the RequestId field.
+func (o *Error) SetRequestId(v string) {
+ o.RequestId = &v
+}
+
+// GetHostId returns the HostId field value if set, zero value otherwise.
+func (o *Error) GetHostId() string {
+ if o == nil || IsNil(o.HostId) {
+ var ret string
+ return ret
+ }
+ return *o.HostId
+}
+
+// GetHostIdOk returns a tuple with the HostId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Error) GetHostIdOk() (*string, bool) {
+ if o == nil || IsNil(o.HostId) {
+ return nil, false
+ }
+ return o.HostId, true
+}
+
+// HasHostId returns a boolean if a field has been set.
+func (o *Error) HasHostId() bool {
+ if o != nil && !IsNil(o.HostId) {
+ return true
+ }
+
+ return false
+}
+
+// SetHostId gets a reference to the given string and assigns it to the HostId field.
+func (o *Error) SetHostId(v string) {
+ o.HostId = &v
+}
+
+func (o Error) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Error) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Code) {
+ toSerialize["Code"] = o.Code
+ }
+ if !IsNil(o.Message) {
+ toSerialize["Message"] = o.Message
+ }
+ if !IsNil(o.RequestId) {
+ toSerialize["RequestId"] = o.RequestId
+ }
+ if !IsNil(o.HostId) {
+ toSerialize["HostId"] = o.HostId
+ }
+ return toSerialize, nil
+}
+
+type NullableError struct {
+ value *Error
+ isSet bool
+}
+
+func (v NullableError) Get() *Error {
+ return v.value
+}
+
+func (v *NullableError) Set(val *Error) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableError) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableError) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableError(val *Error) *NullableError {
+ return &NullableError{value: val, isSet: true}
+}
+
+func (v NullableError) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableError) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_error_document.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_error_document.go
new file mode 100644
index 0000000000..32e3b3f37e
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_error_document.go
@@ -0,0 +1,122 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ErrorDocument type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ErrorDocument{}
+
+// ErrorDocument The object key name to use when a 4XX class error occurs. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+type ErrorDocument struct {
+ XMLName xml.Name `xml:"ErrorDocument"`
+ // The object key.
+ Key string `json:"Key" xml:"Key"`
+}
+
+// NewErrorDocument instantiates a new ErrorDocument object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewErrorDocument(key string) *ErrorDocument {
+ this := ErrorDocument{}
+
+ this.Key = key
+
+ return &this
+}
+
+// NewErrorDocumentWithDefaults instantiates a new ErrorDocument object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewErrorDocumentWithDefaults() *ErrorDocument {
+ this := ErrorDocument{}
+ return &this
+}
+
+// GetKey returns the Key field value
+func (o *ErrorDocument) GetKey() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value
+// and a boolean to check if the value has been set.
+func (o *ErrorDocument) GetKeyOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Key, true
+}
+
+// SetKey sets field value
+func (o *ErrorDocument) SetKey(v string) {
+ o.Key = v
+}
+
+func (o ErrorDocument) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ErrorDocument) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Key"] = o.Key
+ return toSerialize, nil
+}
+
+type NullableErrorDocument struct {
+ value *ErrorDocument
+ isSet bool
+}
+
+func (v NullableErrorDocument) Get() *ErrorDocument {
+ return v.value
+}
+
+func (v *NullableErrorDocument) Set(val *ErrorDocument) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableErrorDocument) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableErrorDocument) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableErrorDocument(val *ErrorDocument) *NullableErrorDocument {
+ return &NullableErrorDocument{value: val, isSet: true}
+}
+
+func (v NullableErrorDocument) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableErrorDocument) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_example.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_example.go
new file mode 100644
index 0000000000..088342bccb
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_example.go
@@ -0,0 +1,129 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Example type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Example{}
+
+// Example struct for Example
+type Example struct {
+ XMLName xml.Name `xml:"Example"`
+ CompleteMultipartUpload *ExampleCompleteMultipartUpload `json:"CompleteMultipartUpload,omitempty" xml:"CompleteMultipartUpload"`
+}
+
+// NewExample instantiates a new Example object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewExample() *Example {
+ this := Example{}
+
+ return &this
+}
+
+// NewExampleWithDefaults instantiates a new Example object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewExampleWithDefaults() *Example {
+ this := Example{}
+ return &this
+}
+
+// GetCompleteMultipartUpload returns the CompleteMultipartUpload field value if set, zero value otherwise.
+func (o *Example) GetCompleteMultipartUpload() ExampleCompleteMultipartUpload {
+ if o == nil || IsNil(o.CompleteMultipartUpload) {
+ var ret ExampleCompleteMultipartUpload
+ return ret
+ }
+ return *o.CompleteMultipartUpload
+}
+
+// GetCompleteMultipartUploadOk returns a tuple with the CompleteMultipartUpload field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Example) GetCompleteMultipartUploadOk() (*ExampleCompleteMultipartUpload, bool) {
+ if o == nil || IsNil(o.CompleteMultipartUpload) {
+ return nil, false
+ }
+ return o.CompleteMultipartUpload, true
+}
+
+// HasCompleteMultipartUpload returns a boolean if a field has been set.
+func (o *Example) HasCompleteMultipartUpload() bool {
+ if o != nil && !IsNil(o.CompleteMultipartUpload) {
+ return true
+ }
+
+ return false
+}
+
+// SetCompleteMultipartUpload gets a reference to the given ExampleCompleteMultipartUpload and assigns it to the CompleteMultipartUpload field.
+func (o *Example) SetCompleteMultipartUpload(v ExampleCompleteMultipartUpload) {
+ o.CompleteMultipartUpload = &v
+}
+
+func (o Example) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Example) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CompleteMultipartUpload) {
+ toSerialize["CompleteMultipartUpload"] = o.CompleteMultipartUpload
+ }
+ return toSerialize, nil
+}
+
+type NullableExample struct {
+ value *Example
+ isSet bool
+}
+
+func (v NullableExample) Get() *Example {
+ return v.value
+}
+
+func (v *NullableExample) Set(val *Example) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableExample) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableExample) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableExample(val *Example) *NullableExample {
+ return &NullableExample{value: val, isSet: true}
+}
+
+func (v NullableExample) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableExample) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_example_complete_multipart_upload.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_example_complete_multipart_upload.go
new file mode 100644
index 0000000000..eb9885cea2
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_example_complete_multipart_upload.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ExampleCompleteMultipartUpload type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ExampleCompleteMultipartUpload{}
+
+// ExampleCompleteMultipartUpload The container for the completed multipart upload details.
+type ExampleCompleteMultipartUpload struct {
+ XMLName xml.Name `xml:"ExampleCompleteMultipartUpload"`
+ // Array of CompletedPart data types.
+ Parts []CompletedPart `json:"Parts,omitempty" xml:"Parts"`
+}
+
+// NewExampleCompleteMultipartUpload instantiates a new ExampleCompleteMultipartUpload object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewExampleCompleteMultipartUpload() *ExampleCompleteMultipartUpload {
+ this := ExampleCompleteMultipartUpload{}
+
+ return &this
+}
+
+// NewExampleCompleteMultipartUploadWithDefaults instantiates a new ExampleCompleteMultipartUpload object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewExampleCompleteMultipartUploadWithDefaults() *ExampleCompleteMultipartUpload {
+ this := ExampleCompleteMultipartUpload{}
+ return &this
+}
+
+// GetParts returns the Parts field value if set, zero value otherwise.
+func (o *ExampleCompleteMultipartUpload) GetParts() []CompletedPart {
+ if o == nil || IsNil(o.Parts) {
+ var ret []CompletedPart
+ return ret
+ }
+ return o.Parts
+}
+
+// GetPartsOk returns a tuple with the Parts field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ExampleCompleteMultipartUpload) GetPartsOk() ([]CompletedPart, bool) {
+ if o == nil || IsNil(o.Parts) {
+ return nil, false
+ }
+ return o.Parts, true
+}
+
+// HasParts returns a boolean if a field has been set.
+func (o *ExampleCompleteMultipartUpload) HasParts() bool {
+ if o != nil && !IsNil(o.Parts) {
+ return true
+ }
+
+ return false
+}
+
+// SetParts gets a reference to the given []CompletedPart and assigns it to the Parts field.
+func (o *ExampleCompleteMultipartUpload) SetParts(v []CompletedPart) {
+ o.Parts = v
+}
+
+func (o ExampleCompleteMultipartUpload) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ExampleCompleteMultipartUpload) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Parts) {
+ toSerialize["Parts"] = o.Parts
+ }
+ return toSerialize, nil
+}
+
+type NullableExampleCompleteMultipartUpload struct {
+ value *ExampleCompleteMultipartUpload
+ isSet bool
+}
+
+func (v NullableExampleCompleteMultipartUpload) Get() *ExampleCompleteMultipartUpload {
+ return v.value
+}
+
+func (v *NullableExampleCompleteMultipartUpload) Set(val *ExampleCompleteMultipartUpload) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableExampleCompleteMultipartUpload) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableExampleCompleteMultipartUpload) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableExampleCompleteMultipartUpload(val *ExampleCompleteMultipartUpload) *NullableExampleCompleteMultipartUpload {
+ return &NullableExampleCompleteMultipartUpload{value: val, isSet: true}
+}
+
+func (v NullableExampleCompleteMultipartUpload) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableExampleCompleteMultipartUpload) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_expiration_status.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_expiration_status.go
new file mode 100644
index 0000000000..1e9f6a9667
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_expiration_status.go
@@ -0,0 +1,84 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ExpirationStatus If `Enabled`, the rule is currently being applied. If `Disabled`, the rule is not currently being applied.
+type ExpirationStatus string
+
+// List of ExpirationStatus
+const (
+ EXPIRATIONSTATUS_ENABLED ExpirationStatus = "Enabled"
+ EXPIRATIONSTATUS_DISABLED ExpirationStatus = "Disabled"
+)
+
+func (v *ExpirationStatus) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ExpirationStatus(value)
+ for _, existing := range []ExpirationStatus{"Enabled", "Disabled"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ExpirationStatus", value)
+}
+
+// Ptr returns reference to ExpirationStatus value
+func (v ExpirationStatus) Ptr() *ExpirationStatus {
+ return &v
+}
+
+type NullableExpirationStatus struct {
+ value *ExpirationStatus
+ isSet bool
+}
+
+func (v NullableExpirationStatus) Get() *ExpirationStatus {
+ return v.value
+}
+
+func (v *NullableExpirationStatus) Set(val *ExpirationStatus) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableExpirationStatus) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableExpirationStatus) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableExpirationStatus(val *ExpirationStatus) *NullableExpirationStatus {
+ return &NullableExpirationStatus{value: val, isSet: true}
+}
+
+func (v NullableExpirationStatus) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableExpirationStatus) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_expression_type.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_expression_type.go
new file mode 100644
index 0000000000..1a2cc31319
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_expression_type.go
@@ -0,0 +1,83 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ExpressionType the model 'ExpressionType'
+type ExpressionType string
+
+// List of ExpressionType
+const (
+ EXPRESSIONTYPE_SQL ExpressionType = "SQL"
+)
+
+func (v *ExpressionType) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ExpressionType(value)
+ for _, existing := range []ExpressionType{"SQL"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ExpressionType", value)
+}
+
+// Ptr returns reference to ExpressionType value
+func (v ExpressionType) Ptr() *ExpressionType {
+ return &v
+}
+
+type NullableExpressionType struct {
+ value *ExpressionType
+ isSet bool
+}
+
+func (v NullableExpressionType) Get() *ExpressionType {
+ return v.value
+}
+
+func (v *NullableExpressionType) Set(val *ExpressionType) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableExpressionType) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableExpressionType) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableExpressionType(val *ExpressionType) *NullableExpressionType {
+ return &NullableExpressionType{value: val, isSet: true}
+}
+
+func (v NullableExpressionType) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableExpressionType) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_filter.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_filter.go
new file mode 100644
index 0000000000..c15d3fe029
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_filter.go
@@ -0,0 +1,122 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Filter type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Filter{}
+
+// Filter The filter
+type Filter struct {
+ XMLName xml.Name `xml:"Filter"`
+ // Object key prefix that identifies one or more objects to which this rule applies. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ Prefix string `json:"Prefix" xml:"Prefix"`
+}
+
+// NewFilter instantiates a new Filter object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewFilter(prefix string) *Filter {
+ this := Filter{}
+
+ this.Prefix = prefix
+
+ return &this
+}
+
+// NewFilterWithDefaults instantiates a new Filter object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewFilterWithDefaults() *Filter {
+ this := Filter{}
+ return &this
+}
+
+// GetPrefix returns the Prefix field value
+func (o *Filter) GetPrefix() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Prefix
+}
+
+// GetPrefixOk returns a tuple with the Prefix field value
+// and a boolean to check if the value has been set.
+func (o *Filter) GetPrefixOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Prefix, true
+}
+
+// SetPrefix sets field value
+func (o *Filter) SetPrefix(v string) {
+ o.Prefix = v
+}
+
+func (o Filter) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Filter) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Prefix"] = o.Prefix
+ return toSerialize, nil
+}
+
+type NullableFilter struct {
+ value *Filter
+ isSet bool
+}
+
+func (v NullableFilter) Get() *Filter {
+ return v.value
+}
+
+func (v *NullableFilter) Set(val *Filter) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableFilter) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableFilter) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableFilter(val *Filter) *NullableFilter {
+ return &NullableFilter{value: val, isSet: true}
+}
+
+func (v NullableFilter) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableFilter) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_cors_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_cors_output.go
new file mode 100644
index 0000000000..6069daf50f
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_cors_output.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the GetBucketCorsOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetBucketCorsOutput{}
+
+// GetBucketCorsOutput struct for GetBucketCorsOutput
+type GetBucketCorsOutput struct {
+ XMLName xml.Name `xml:"CORSConfiguration"`
+ // A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.
+ CORSRules []CORSRule `json:"CORSRules,omitempty" xml:"CORSRule"`
+}
+
+// NewGetBucketCorsOutput instantiates a new GetBucketCorsOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetBucketCorsOutput() *GetBucketCorsOutput {
+ this := GetBucketCorsOutput{}
+
+ return &this
+}
+
+// NewGetBucketCorsOutputWithDefaults instantiates a new GetBucketCorsOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetBucketCorsOutputWithDefaults() *GetBucketCorsOutput {
+ this := GetBucketCorsOutput{}
+ return &this
+}
+
+// GetCORSRules returns the CORSRules field value if set, zero value otherwise.
+func (o *GetBucketCorsOutput) GetCORSRules() []CORSRule {
+ if o == nil || IsNil(o.CORSRules) {
+ var ret []CORSRule
+ return ret
+ }
+ return o.CORSRules
+}
+
+// GetCORSRulesOk returns a tuple with the CORSRules field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketCorsOutput) GetCORSRulesOk() ([]CORSRule, bool) {
+ if o == nil || IsNil(o.CORSRules) {
+ return nil, false
+ }
+ return o.CORSRules, true
+}
+
+// HasCORSRules returns a boolean if a field has been set.
+func (o *GetBucketCorsOutput) HasCORSRules() bool {
+ if o != nil && !IsNil(o.CORSRules) {
+ return true
+ }
+
+ return false
+}
+
+// SetCORSRules gets a reference to the given []CORSRule and assigns it to the CORSRules field.
+func (o *GetBucketCorsOutput) SetCORSRules(v []CORSRule) {
+ o.CORSRules = v
+}
+
+func (o GetBucketCorsOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetBucketCorsOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CORSRules) {
+ toSerialize["CORSRules"] = o.CORSRules
+ }
+ return toSerialize, nil
+}
+
+type NullableGetBucketCorsOutput struct {
+ value *GetBucketCorsOutput
+ isSet bool
+}
+
+func (v NullableGetBucketCorsOutput) Get() *GetBucketCorsOutput {
+ return v.value
+}
+
+func (v *NullableGetBucketCorsOutput) Set(val *GetBucketCorsOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetBucketCorsOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetBucketCorsOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetBucketCorsOutput(val *GetBucketCorsOutput) *NullableGetBucketCorsOutput {
+ return &NullableGetBucketCorsOutput{value: val, isSet: true}
+}
+
+func (v NullableGetBucketCorsOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetBucketCorsOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_lifecycle_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_lifecycle_output.go
new file mode 100644
index 0000000000..a7b8537582
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_lifecycle_output.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the GetBucketLifecycleOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetBucketLifecycleOutput{}
+
+// GetBucketLifecycleOutput struct for GetBucketLifecycleOutput
+type GetBucketLifecycleOutput struct {
+ XMLName xml.Name `xml:"LifecycleConfiguration"`
+ // Container for a lifecycle rules.
+ Rules []Rule `json:"Rules,omitempty" xml:"Rule"`
+}
+
+// NewGetBucketLifecycleOutput instantiates a new GetBucketLifecycleOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetBucketLifecycleOutput() *GetBucketLifecycleOutput {
+ this := GetBucketLifecycleOutput{}
+
+ return &this
+}
+
+// NewGetBucketLifecycleOutputWithDefaults instantiates a new GetBucketLifecycleOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetBucketLifecycleOutputWithDefaults() *GetBucketLifecycleOutput {
+ this := GetBucketLifecycleOutput{}
+ return &this
+}
+
+// GetRules returns the Rules field value if set, zero value otherwise.
+func (o *GetBucketLifecycleOutput) GetRules() []Rule {
+ if o == nil || IsNil(o.Rules) {
+ var ret []Rule
+ return ret
+ }
+ return o.Rules
+}
+
+// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketLifecycleOutput) GetRulesOk() ([]Rule, bool) {
+ if o == nil || IsNil(o.Rules) {
+ return nil, false
+ }
+ return o.Rules, true
+}
+
+// HasRules returns a boolean if a field has been set.
+func (o *GetBucketLifecycleOutput) HasRules() bool {
+ if o != nil && !IsNil(o.Rules) {
+ return true
+ }
+
+ return false
+}
+
+// SetRules gets a reference to the given []Rule and assigns it to the Rules field.
+func (o *GetBucketLifecycleOutput) SetRules(v []Rule) {
+ o.Rules = v
+}
+
+func (o GetBucketLifecycleOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetBucketLifecycleOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Rules) {
+ toSerialize["Rules"] = o.Rules
+ }
+ return toSerialize, nil
+}
+
+type NullableGetBucketLifecycleOutput struct {
+ value *GetBucketLifecycleOutput
+ isSet bool
+}
+
+func (v NullableGetBucketLifecycleOutput) Get() *GetBucketLifecycleOutput {
+ return v.value
+}
+
+func (v *NullableGetBucketLifecycleOutput) Set(val *GetBucketLifecycleOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetBucketLifecycleOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetBucketLifecycleOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetBucketLifecycleOutput(val *GetBucketLifecycleOutput) *NullableGetBucketLifecycleOutput {
+ return &NullableGetBucketLifecycleOutput{value: val, isSet: true}
+}
+
+func (v NullableGetBucketLifecycleOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetBucketLifecycleOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_replication_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_replication_output.go
new file mode 100644
index 0000000000..82a37c968d
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_replication_output.go
@@ -0,0 +1,129 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the GetBucketReplicationOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetBucketReplicationOutput{}
+
+// GetBucketReplicationOutput struct for GetBucketReplicationOutput
+type GetBucketReplicationOutput struct {
+ XMLName xml.Name `xml:"GetBucketReplicationOutput"`
+ ReplicationConfiguration *ReplicationConfiguration `json:"ReplicationConfiguration,omitempty" xml:"ReplicationConfiguration"`
+}
+
+// NewGetBucketReplicationOutput instantiates a new GetBucketReplicationOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetBucketReplicationOutput() *GetBucketReplicationOutput {
+ this := GetBucketReplicationOutput{}
+
+ return &this
+}
+
+// NewGetBucketReplicationOutputWithDefaults instantiates a new GetBucketReplicationOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetBucketReplicationOutputWithDefaults() *GetBucketReplicationOutput {
+ this := GetBucketReplicationOutput{}
+ return &this
+}
+
+// GetReplicationConfiguration returns the ReplicationConfiguration field value if set, zero value otherwise.
+func (o *GetBucketReplicationOutput) GetReplicationConfiguration() ReplicationConfiguration {
+ if o == nil || IsNil(o.ReplicationConfiguration) {
+ var ret ReplicationConfiguration
+ return ret
+ }
+ return *o.ReplicationConfiguration
+}
+
+// GetReplicationConfigurationOk returns a tuple with the ReplicationConfiguration field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketReplicationOutput) GetReplicationConfigurationOk() (*ReplicationConfiguration, bool) {
+ if o == nil || IsNil(o.ReplicationConfiguration) {
+ return nil, false
+ }
+ return o.ReplicationConfiguration, true
+}
+
+// HasReplicationConfiguration returns a boolean if a field has been set.
+func (o *GetBucketReplicationOutput) HasReplicationConfiguration() bool {
+ if o != nil && !IsNil(o.ReplicationConfiguration) {
+ return true
+ }
+
+ return false
+}
+
+// SetReplicationConfiguration gets a reference to the given ReplicationConfiguration and assigns it to the ReplicationConfiguration field.
+func (o *GetBucketReplicationOutput) SetReplicationConfiguration(v ReplicationConfiguration) {
+ o.ReplicationConfiguration = &v
+}
+
+func (o GetBucketReplicationOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetBucketReplicationOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ReplicationConfiguration) {
+ toSerialize["ReplicationConfiguration"] = o.ReplicationConfiguration
+ }
+ return toSerialize, nil
+}
+
+type NullableGetBucketReplicationOutput struct {
+ value *GetBucketReplicationOutput
+ isSet bool
+}
+
+func (v NullableGetBucketReplicationOutput) Get() *GetBucketReplicationOutput {
+ return v.value
+}
+
+func (v *NullableGetBucketReplicationOutput) Set(val *GetBucketReplicationOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetBucketReplicationOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetBucketReplicationOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetBucketReplicationOutput(val *GetBucketReplicationOutput) *NullableGetBucketReplicationOutput {
+ return &NullableGetBucketReplicationOutput{value: val, isSet: true}
+}
+
+func (v NullableGetBucketReplicationOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetBucketReplicationOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_tagging_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_tagging_output.go
new file mode 100644
index 0000000000..067792bad2
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_tagging_output.go
@@ -0,0 +1,122 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the GetBucketTaggingOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetBucketTaggingOutput{}
+
+// GetBucketTaggingOutput struct for GetBucketTaggingOutput
+type GetBucketTaggingOutput struct {
+ XMLName xml.Name `xml:"Tagging"`
+ // Contains the tag set.
+ TagSet []Tag `json:"TagSet" xml:"TagSet>Tag"`
+}
+
+// NewGetBucketTaggingOutput instantiates a new GetBucketTaggingOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetBucketTaggingOutput(tagSet []Tag) *GetBucketTaggingOutput {
+ this := GetBucketTaggingOutput{}
+
+ this.TagSet = tagSet
+
+ return &this
+}
+
+// NewGetBucketTaggingOutputWithDefaults instantiates a new GetBucketTaggingOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetBucketTaggingOutputWithDefaults() *GetBucketTaggingOutput {
+ this := GetBucketTaggingOutput{}
+ return &this
+}
+
+// GetTagSet returns the TagSet field value
+func (o *GetBucketTaggingOutput) GetTagSet() []Tag {
+ if o == nil {
+ var ret []Tag
+ return ret
+ }
+
+ return o.TagSet
+}
+
+// GetTagSetOk returns a tuple with the TagSet field value
+// and a boolean to check if the value has been set.
+func (o *GetBucketTaggingOutput) GetTagSetOk() ([]Tag, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.TagSet, true
+}
+
+// SetTagSet sets field value
+func (o *GetBucketTaggingOutput) SetTagSet(v []Tag) {
+ o.TagSet = v
+}
+
+func (o GetBucketTaggingOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetBucketTaggingOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["TagSet"] = o.TagSet
+ return toSerialize, nil
+}
+
+type NullableGetBucketTaggingOutput struct {
+ value *GetBucketTaggingOutput
+ isSet bool
+}
+
+func (v NullableGetBucketTaggingOutput) Get() *GetBucketTaggingOutput {
+ return v.value
+}
+
+func (v *NullableGetBucketTaggingOutput) Set(val *GetBucketTaggingOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetBucketTaggingOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetBucketTaggingOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetBucketTaggingOutput(val *GetBucketTaggingOutput) *NullableGetBucketTaggingOutput {
+ return &NullableGetBucketTaggingOutput{value: val, isSet: true}
+}
+
+func (v NullableGetBucketTaggingOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetBucketTaggingOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_versioning_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_versioning_output.go
new file mode 100644
index 0000000000..cb9516c5c0
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_versioning_output.go
@@ -0,0 +1,165 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the GetBucketVersioningOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetBucketVersioningOutput{}
+
+// GetBucketVersioningOutput The versioning configuration of the bucket.
+type GetBucketVersioningOutput struct {
+ XMLName xml.Name `xml:"VersioningConfiguration"`
+ Status *BucketVersioningStatus `json:"Status,omitempty" xml:"Status"`
+ MfaDelete *MfaDeleteStatus `json:"MfaDelete,omitempty" xml:"MfaDelete"`
+}
+
+// NewGetBucketVersioningOutput instantiates a new GetBucketVersioningOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetBucketVersioningOutput() *GetBucketVersioningOutput {
+ this := GetBucketVersioningOutput{}
+
+ return &this
+}
+
+// NewGetBucketVersioningOutputWithDefaults instantiates a new GetBucketVersioningOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetBucketVersioningOutputWithDefaults() *GetBucketVersioningOutput {
+ this := GetBucketVersioningOutput{}
+ return &this
+}
+
+// GetStatus returns the Status field value if set, zero value otherwise.
+func (o *GetBucketVersioningOutput) GetStatus() BucketVersioningStatus {
+ if o == nil || IsNil(o.Status) {
+ var ret BucketVersioningStatus
+ return ret
+ }
+ return *o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketVersioningOutput) GetStatusOk() (*BucketVersioningStatus, bool) {
+ if o == nil || IsNil(o.Status) {
+ return nil, false
+ }
+ return o.Status, true
+}
+
+// HasStatus returns a boolean if a field has been set.
+func (o *GetBucketVersioningOutput) HasStatus() bool {
+ if o != nil && !IsNil(o.Status) {
+ return true
+ }
+
+ return false
+}
+
+// SetStatus gets a reference to the given BucketVersioningStatus and assigns it to the Status field.
+func (o *GetBucketVersioningOutput) SetStatus(v BucketVersioningStatus) {
+ o.Status = &v
+}
+
+// GetMfaDelete returns the MfaDelete field value if set, zero value otherwise.
+func (o *GetBucketVersioningOutput) GetMfaDelete() MfaDeleteStatus {
+ if o == nil || IsNil(o.MfaDelete) {
+ var ret MfaDeleteStatus
+ return ret
+ }
+ return *o.MfaDelete
+}
+
+// GetMfaDeleteOk returns a tuple with the MfaDelete field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketVersioningOutput) GetMfaDeleteOk() (*MfaDeleteStatus, bool) {
+ if o == nil || IsNil(o.MfaDelete) {
+ return nil, false
+ }
+ return o.MfaDelete, true
+}
+
+// HasMfaDelete returns a boolean if a field has been set.
+func (o *GetBucketVersioningOutput) HasMfaDelete() bool {
+ if o != nil && !IsNil(o.MfaDelete) {
+ return true
+ }
+
+ return false
+}
+
+// SetMfaDelete gets a reference to the given MfaDeleteStatus and assigns it to the MfaDelete field.
+func (o *GetBucketVersioningOutput) SetMfaDelete(v MfaDeleteStatus) {
+ o.MfaDelete = &v
+}
+
+func (o GetBucketVersioningOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetBucketVersioningOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Status) {
+ toSerialize["Status"] = o.Status
+ }
+ if !IsNil(o.MfaDelete) {
+ toSerialize["MfaDelete"] = o.MfaDelete
+ }
+ return toSerialize, nil
+}
+
+type NullableGetBucketVersioningOutput struct {
+ value *GetBucketVersioningOutput
+ isSet bool
+}
+
+func (v NullableGetBucketVersioningOutput) Get() *GetBucketVersioningOutput {
+ return v.value
+}
+
+func (v *NullableGetBucketVersioningOutput) Set(val *GetBucketVersioningOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetBucketVersioningOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetBucketVersioningOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetBucketVersioningOutput(val *GetBucketVersioningOutput) *NullableGetBucketVersioningOutput {
+ return &NullableGetBucketVersioningOutput{value: val, isSet: true}
+}
+
+func (v NullableGetBucketVersioningOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetBucketVersioningOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_website_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_website_output.go
new file mode 100644
index 0000000000..5c6e7fe279
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_bucket_website_output.go
@@ -0,0 +1,237 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the GetBucketWebsiteOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetBucketWebsiteOutput{}
+
+// GetBucketWebsiteOutput struct for GetBucketWebsiteOutput
+type GetBucketWebsiteOutput struct {
+ XMLName xml.Name `xml:"WebsiteConfiguration"`
+ RedirectAllRequestsTo *RedirectAllRequestsTo `json:"RedirectAllRequestsTo,omitempty" xml:"RedirectAllRequestsTo"`
+ IndexDocument *IndexDocument `json:"IndexDocument,omitempty" xml:"IndexDocument"`
+ ErrorDocument *ErrorDocument `json:"ErrorDocument,omitempty" xml:"ErrorDocument"`
+ RoutingRules []RoutingRule `json:"RoutingRules,omitempty" xml:"RoutingRules"`
+}
+
+// NewGetBucketWebsiteOutput instantiates a new GetBucketWebsiteOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetBucketWebsiteOutput() *GetBucketWebsiteOutput {
+ this := GetBucketWebsiteOutput{}
+
+ return &this
+}
+
+// NewGetBucketWebsiteOutputWithDefaults instantiates a new GetBucketWebsiteOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetBucketWebsiteOutputWithDefaults() *GetBucketWebsiteOutput {
+ this := GetBucketWebsiteOutput{}
+ return &this
+}
+
+// GetRedirectAllRequestsTo returns the RedirectAllRequestsTo field value if set, zero value otherwise.
+func (o *GetBucketWebsiteOutput) GetRedirectAllRequestsTo() RedirectAllRequestsTo {
+ if o == nil || IsNil(o.RedirectAllRequestsTo) {
+ var ret RedirectAllRequestsTo
+ return ret
+ }
+ return *o.RedirectAllRequestsTo
+}
+
+// GetRedirectAllRequestsToOk returns a tuple with the RedirectAllRequestsTo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketWebsiteOutput) GetRedirectAllRequestsToOk() (*RedirectAllRequestsTo, bool) {
+ if o == nil || IsNil(o.RedirectAllRequestsTo) {
+ return nil, false
+ }
+ return o.RedirectAllRequestsTo, true
+}
+
+// HasRedirectAllRequestsTo returns a boolean if a field has been set.
+func (o *GetBucketWebsiteOutput) HasRedirectAllRequestsTo() bool {
+ if o != nil && !IsNil(o.RedirectAllRequestsTo) {
+ return true
+ }
+
+ return false
+}
+
+// SetRedirectAllRequestsTo gets a reference to the given RedirectAllRequestsTo and assigns it to the RedirectAllRequestsTo field.
+func (o *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v RedirectAllRequestsTo) {
+ o.RedirectAllRequestsTo = &v
+}
+
+// GetIndexDocument returns the IndexDocument field value if set, zero value otherwise.
+func (o *GetBucketWebsiteOutput) GetIndexDocument() IndexDocument {
+ if o == nil || IsNil(o.IndexDocument) {
+ var ret IndexDocument
+ return ret
+ }
+ return *o.IndexDocument
+}
+
+// GetIndexDocumentOk returns a tuple with the IndexDocument field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketWebsiteOutput) GetIndexDocumentOk() (*IndexDocument, bool) {
+ if o == nil || IsNil(o.IndexDocument) {
+ return nil, false
+ }
+ return o.IndexDocument, true
+}
+
+// HasIndexDocument returns a boolean if a field has been set.
+func (o *GetBucketWebsiteOutput) HasIndexDocument() bool {
+ if o != nil && !IsNil(o.IndexDocument) {
+ return true
+ }
+
+ return false
+}
+
+// SetIndexDocument gets a reference to the given IndexDocument and assigns it to the IndexDocument field.
+func (o *GetBucketWebsiteOutput) SetIndexDocument(v IndexDocument) {
+ o.IndexDocument = &v
+}
+
+// GetErrorDocument returns the ErrorDocument field value if set, zero value otherwise.
+func (o *GetBucketWebsiteOutput) GetErrorDocument() ErrorDocument {
+ if o == nil || IsNil(o.ErrorDocument) {
+ var ret ErrorDocument
+ return ret
+ }
+ return *o.ErrorDocument
+}
+
+// GetErrorDocumentOk returns a tuple with the ErrorDocument field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketWebsiteOutput) GetErrorDocumentOk() (*ErrorDocument, bool) {
+ if o == nil || IsNil(o.ErrorDocument) {
+ return nil, false
+ }
+ return o.ErrorDocument, true
+}
+
+// HasErrorDocument returns a boolean if a field has been set.
+func (o *GetBucketWebsiteOutput) HasErrorDocument() bool {
+ if o != nil && !IsNil(o.ErrorDocument) {
+ return true
+ }
+
+ return false
+}
+
+// SetErrorDocument gets a reference to the given ErrorDocument and assigns it to the ErrorDocument field.
+func (o *GetBucketWebsiteOutput) SetErrorDocument(v ErrorDocument) {
+ o.ErrorDocument = &v
+}
+
+// GetRoutingRules returns the RoutingRules field value if set, zero value otherwise.
+func (o *GetBucketWebsiteOutput) GetRoutingRules() []RoutingRule {
+ if o == nil || IsNil(o.RoutingRules) {
+ var ret []RoutingRule
+ return ret
+ }
+ return o.RoutingRules
+}
+
+// GetRoutingRulesOk returns a tuple with the RoutingRules field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetBucketWebsiteOutput) GetRoutingRulesOk() ([]RoutingRule, bool) {
+ if o == nil || IsNil(o.RoutingRules) {
+ return nil, false
+ }
+ return o.RoutingRules, true
+}
+
+// HasRoutingRules returns a boolean if a field has been set.
+func (o *GetBucketWebsiteOutput) HasRoutingRules() bool {
+ if o != nil && !IsNil(o.RoutingRules) {
+ return true
+ }
+
+ return false
+}
+
+// SetRoutingRules gets a reference to the given []RoutingRule and assigns it to the RoutingRules field.
+func (o *GetBucketWebsiteOutput) SetRoutingRules(v []RoutingRule) {
+ o.RoutingRules = v
+}
+
+func (o GetBucketWebsiteOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetBucketWebsiteOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.RedirectAllRequestsTo) {
+ toSerialize["RedirectAllRequestsTo"] = o.RedirectAllRequestsTo
+ }
+ if !IsNil(o.IndexDocument) {
+ toSerialize["IndexDocument"] = o.IndexDocument
+ }
+ if !IsNil(o.ErrorDocument) {
+ toSerialize["ErrorDocument"] = o.ErrorDocument
+ }
+ if !IsNil(o.RoutingRules) {
+ toSerialize["RoutingRules"] = o.RoutingRules
+ }
+ return toSerialize, nil
+}
+
+type NullableGetBucketWebsiteOutput struct {
+ value *GetBucketWebsiteOutput
+ isSet bool
+}
+
+func (v NullableGetBucketWebsiteOutput) Get() *GetBucketWebsiteOutput {
+ return v.value
+}
+
+func (v *NullableGetBucketWebsiteOutput) Set(val *GetBucketWebsiteOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetBucketWebsiteOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetBucketWebsiteOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetBucketWebsiteOutput(val *GetBucketWebsiteOutput) *NullableGetBucketWebsiteOutput {
+ return &NullableGetBucketWebsiteOutput{value: val, isSet: true}
+}
+
+func (v NullableGetBucketWebsiteOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetBucketWebsiteOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_object_lock_configuration_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_object_lock_configuration_output.go
new file mode 100644
index 0000000000..ba5b62ac14
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_object_lock_configuration_output.go
@@ -0,0 +1,165 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the GetObjectLockConfigurationOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetObjectLockConfigurationOutput{}
+
+// GetObjectLockConfigurationOutput A container for an object lock configuration.
+type GetObjectLockConfigurationOutput struct {
+ XMLName xml.Name `xml:"ObjectLockConfiguration"`
+ ObjectLockEnabled *string `json:"ObjectLockEnabled,omitempty" xml:"ObjectLockEnabled"`
+ Rule *ObjectLockRule `json:"Rule,omitempty" xml:"Rule"`
+}
+
+// NewGetObjectLockConfigurationOutput instantiates a new GetObjectLockConfigurationOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetObjectLockConfigurationOutput() *GetObjectLockConfigurationOutput {
+ this := GetObjectLockConfigurationOutput{}
+
+ return &this
+}
+
+// NewGetObjectLockConfigurationOutputWithDefaults instantiates a new GetObjectLockConfigurationOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetObjectLockConfigurationOutputWithDefaults() *GetObjectLockConfigurationOutput {
+ this := GetObjectLockConfigurationOutput{}
+ return &this
+}
+
+// GetObjectLockEnabled returns the ObjectLockEnabled field value if set, zero value otherwise.
+func (o *GetObjectLockConfigurationOutput) GetObjectLockEnabled() string {
+ if o == nil || IsNil(o.ObjectLockEnabled) {
+ var ret string
+ return ret
+ }
+ return *o.ObjectLockEnabled
+}
+
+// GetObjectLockEnabledOk returns a tuple with the ObjectLockEnabled field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetObjectLockConfigurationOutput) GetObjectLockEnabledOk() (*string, bool) {
+ if o == nil || IsNil(o.ObjectLockEnabled) {
+ return nil, false
+ }
+ return o.ObjectLockEnabled, true
+}
+
+// HasObjectLockEnabled returns a boolean if a field has been set.
+func (o *GetObjectLockConfigurationOutput) HasObjectLockEnabled() bool {
+ if o != nil && !IsNil(o.ObjectLockEnabled) {
+ return true
+ }
+
+ return false
+}
+
+// SetObjectLockEnabled gets a reference to the given string and assigns it to the ObjectLockEnabled field.
+func (o *GetObjectLockConfigurationOutput) SetObjectLockEnabled(v string) {
+ o.ObjectLockEnabled = &v
+}
+
+// GetRule returns the Rule field value if set, zero value otherwise.
+func (o *GetObjectLockConfigurationOutput) GetRule() ObjectLockRule {
+ if o == nil || IsNil(o.Rule) {
+ var ret ObjectLockRule
+ return ret
+ }
+ return *o.Rule
+}
+
+// GetRuleOk returns a tuple with the Rule field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *GetObjectLockConfigurationOutput) GetRuleOk() (*ObjectLockRule, bool) {
+ if o == nil || IsNil(o.Rule) {
+ return nil, false
+ }
+ return o.Rule, true
+}
+
+// HasRule returns a boolean if a field has been set.
+func (o *GetObjectLockConfigurationOutput) HasRule() bool {
+ if o != nil && !IsNil(o.Rule) {
+ return true
+ }
+
+ return false
+}
+
+// SetRule gets a reference to the given ObjectLockRule and assigns it to the Rule field.
+func (o *GetObjectLockConfigurationOutput) SetRule(v ObjectLockRule) {
+ o.Rule = &v
+}
+
+func (o GetObjectLockConfigurationOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetObjectLockConfigurationOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ObjectLockEnabled) {
+ toSerialize["ObjectLockEnabled"] = o.ObjectLockEnabled
+ }
+ if !IsNil(o.Rule) {
+ toSerialize["Rule"] = o.Rule
+ }
+ return toSerialize, nil
+}
+
+type NullableGetObjectLockConfigurationOutput struct {
+ value *GetObjectLockConfigurationOutput
+ isSet bool
+}
+
+func (v NullableGetObjectLockConfigurationOutput) Get() *GetObjectLockConfigurationOutput {
+ return v.value
+}
+
+func (v *NullableGetObjectLockConfigurationOutput) Set(val *GetObjectLockConfigurationOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetObjectLockConfigurationOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetObjectLockConfigurationOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetObjectLockConfigurationOutput(val *GetObjectLockConfigurationOutput) *NullableGetObjectLockConfigurationOutput {
+ return &NullableGetObjectLockConfigurationOutput{value: val, isSet: true}
+}
+
+func (v NullableGetObjectLockConfigurationOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetObjectLockConfigurationOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_object_tagging_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_object_tagging_output.go
new file mode 100644
index 0000000000..18be37bd67
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_get_object_tagging_output.go
@@ -0,0 +1,122 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the GetObjectTaggingOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &GetObjectTaggingOutput{}
+
+// GetObjectTaggingOutput struct for GetObjectTaggingOutput
+type GetObjectTaggingOutput struct {
+ XMLName xml.Name `xml:"Tagging"`
+ // Contains the tag set.
+ TagSet []Tag `json:"TagSet" xml:"TagSet>Tag"`
+}
+
+// NewGetObjectTaggingOutput instantiates a new GetObjectTaggingOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewGetObjectTaggingOutput(tagSet []Tag) *GetObjectTaggingOutput {
+ this := GetObjectTaggingOutput{}
+
+ this.TagSet = tagSet
+
+ return &this
+}
+
+// NewGetObjectTaggingOutputWithDefaults instantiates a new GetObjectTaggingOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewGetObjectTaggingOutputWithDefaults() *GetObjectTaggingOutput {
+ this := GetObjectTaggingOutput{}
+ return &this
+}
+
+// GetTagSet returns the TagSet field value
+func (o *GetObjectTaggingOutput) GetTagSet() []Tag {
+ if o == nil {
+ var ret []Tag
+ return ret
+ }
+
+ return o.TagSet
+}
+
+// GetTagSetOk returns a tuple with the TagSet field value
+// and a boolean to check if the value has been set.
+func (o *GetObjectTaggingOutput) GetTagSetOk() ([]Tag, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.TagSet, true
+}
+
+// SetTagSet sets field value
+func (o *GetObjectTaggingOutput) SetTagSet(v []Tag) {
+ o.TagSet = v
+}
+
+func (o GetObjectTaggingOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o GetObjectTaggingOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["TagSet"] = o.TagSet
+ return toSerialize, nil
+}
+
+type NullableGetObjectTaggingOutput struct {
+ value *GetObjectTaggingOutput
+ isSet bool
+}
+
+func (v NullableGetObjectTaggingOutput) Get() *GetObjectTaggingOutput {
+ return v.value
+}
+
+func (v *NullableGetObjectTaggingOutput) Set(val *GetObjectTaggingOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableGetObjectTaggingOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableGetObjectTaggingOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableGetObjectTaggingOutput(val *GetObjectTaggingOutput) *NullableGetObjectTaggingOutput {
+ return &NullableGetObjectTaggingOutput{value: val, isSet: true}
+}
+
+func (v NullableGetObjectTaggingOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableGetObjectTaggingOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_head_object_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_head_object_output.go
new file mode 100644
index 0000000000..47e8ed90a7
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_head_object_output.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the HeadObjectOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &HeadObjectOutput{}
+
+// HeadObjectOutput struct for HeadObjectOutput
+type HeadObjectOutput struct {
+ XMLName xml.Name `xml:"HeadObjectOutput"`
+ // A map of metadata to store with the object. Each key must start with `x-amz-meta-` prefix.
+ Metadata *map[string]string `json:"Metadata,omitempty" xml:"Metadata"`
+}
+
+// NewHeadObjectOutput instantiates a new HeadObjectOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewHeadObjectOutput() *HeadObjectOutput {
+ this := HeadObjectOutput{}
+
+ return &this
+}
+
+// NewHeadObjectOutputWithDefaults instantiates a new HeadObjectOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewHeadObjectOutputWithDefaults() *HeadObjectOutput {
+ this := HeadObjectOutput{}
+ return &this
+}
+
+// GetMetadata returns the Metadata field value if set, zero value otherwise.
+func (o *HeadObjectOutput) GetMetadata() map[string]string {
+ if o == nil || IsNil(o.Metadata) {
+ var ret map[string]string
+ return ret
+ }
+ return *o.Metadata
+}
+
+// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *HeadObjectOutput) GetMetadataOk() (*map[string]string, bool) {
+ if o == nil || IsNil(o.Metadata) {
+ return nil, false
+ }
+ return o.Metadata, true
+}
+
+// HasMetadata returns a boolean if a field has been set.
+func (o *HeadObjectOutput) HasMetadata() bool {
+ if o != nil && !IsNil(o.Metadata) {
+ return true
+ }
+
+ return false
+}
+
+// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field.
+func (o *HeadObjectOutput) SetMetadata(v map[string]string) {
+ o.Metadata = &v
+}
+
+func (o HeadObjectOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o HeadObjectOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Metadata) {
+ toSerialize["Metadata"] = o.Metadata
+ }
+ return toSerialize, nil
+}
+
+type NullableHeadObjectOutput struct {
+ value *HeadObjectOutput
+ isSet bool
+}
+
+func (v NullableHeadObjectOutput) Get() *HeadObjectOutput {
+ return v.value
+}
+
+func (v *NullableHeadObjectOutput) Set(val *HeadObjectOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableHeadObjectOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableHeadObjectOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableHeadObjectOutput(val *HeadObjectOutput) *NullableHeadObjectOutput {
+ return &NullableHeadObjectOutput{value: val, isSet: true}
+}
+
+func (v NullableHeadObjectOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableHeadObjectOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_index_document.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_index_document.go
new file mode 100644
index 0000000000..35a1f45ed2
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_index_document.go
@@ -0,0 +1,122 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the IndexDocument type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &IndexDocument{}
+
+// IndexDocument Container for the `Suffix` element.
+type IndexDocument struct {
+ XMLName xml.Name `xml:"IndexDocument"`
+ // A suffix that is appended to a request that is for a directory on the website endpoint (for example, if the suffix is index.html and you make a request to `samplebucket/images/` the data that is returned will be for the object with the key name `images/index.html`) The suffix must not be empty and must not include a slash character. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ Suffix string `json:"Suffix" xml:"Suffix"`
+}
+
+// NewIndexDocument instantiates a new IndexDocument object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewIndexDocument(suffix string) *IndexDocument {
+ this := IndexDocument{}
+
+ this.Suffix = suffix
+
+ return &this
+}
+
+// NewIndexDocumentWithDefaults instantiates a new IndexDocument object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewIndexDocumentWithDefaults() *IndexDocument {
+ this := IndexDocument{}
+ return &this
+}
+
+// GetSuffix returns the Suffix field value
+func (o *IndexDocument) GetSuffix() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Suffix
+}
+
+// GetSuffixOk returns a tuple with the Suffix field value
+// and a boolean to check if the value has been set.
+func (o *IndexDocument) GetSuffixOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Suffix, true
+}
+
+// SetSuffix sets field value
+func (o *IndexDocument) SetSuffix(v string) {
+ o.Suffix = v
+}
+
+func (o IndexDocument) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o IndexDocument) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Suffix"] = o.Suffix
+ return toSerialize, nil
+}
+
+type NullableIndexDocument struct {
+ value *IndexDocument
+ isSet bool
+}
+
+func (v NullableIndexDocument) Get() *IndexDocument {
+ return v.value
+}
+
+func (v *NullableIndexDocument) Set(val *IndexDocument) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableIndexDocument) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableIndexDocument) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableIndexDocument(val *IndexDocument) *NullableIndexDocument {
+ return &NullableIndexDocument{value: val, isSet: true}
+}
+
+func (v NullableIndexDocument) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableIndexDocument) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_initiator.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_initiator.go
new file mode 100644
index 0000000000..eb893730aa
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_initiator.go
@@ -0,0 +1,167 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Initiator type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Initiator{}
+
+// Initiator Container element that identifies who initiated the multipart upload.
+type Initiator struct {
+ XMLName xml.Name `xml:"Initiator"`
+ // Container for the Contract Number of the owner.
+ ID *int32 `json:"ID,omitempty" xml:"ID"`
+ // Container for the display name of the owner.
+ DisplayName *string `json:"DisplayName,omitempty" xml:"DisplayName"`
+}
+
+// NewInitiator instantiates a new Initiator object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewInitiator() *Initiator {
+ this := Initiator{}
+
+ return &this
+}
+
+// NewInitiatorWithDefaults instantiates a new Initiator object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewInitiatorWithDefaults() *Initiator {
+ this := Initiator{}
+ return &this
+}
+
+// GetID returns the ID field value if set, zero value otherwise.
+func (o *Initiator) GetID() int32 {
+ if o == nil || IsNil(o.ID) {
+ var ret int32
+ return ret
+ }
+ return *o.ID
+}
+
+// GetIDOk returns a tuple with the ID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Initiator) GetIDOk() (*int32, bool) {
+ if o == nil || IsNil(o.ID) {
+ return nil, false
+ }
+ return o.ID, true
+}
+
+// HasID returns a boolean if a field has been set.
+func (o *Initiator) HasID() bool {
+ if o != nil && !IsNil(o.ID) {
+ return true
+ }
+
+ return false
+}
+
+// SetID gets a reference to the given int32 and assigns it to the ID field.
+func (o *Initiator) SetID(v int32) {
+ o.ID = &v
+}
+
+// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
+func (o *Initiator) GetDisplayName() string {
+ if o == nil || IsNil(o.DisplayName) {
+ var ret string
+ return ret
+ }
+ return *o.DisplayName
+}
+
+// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Initiator) GetDisplayNameOk() (*string, bool) {
+ if o == nil || IsNil(o.DisplayName) {
+ return nil, false
+ }
+ return o.DisplayName, true
+}
+
+// HasDisplayName returns a boolean if a field has been set.
+func (o *Initiator) HasDisplayName() bool {
+ if o != nil && !IsNil(o.DisplayName) {
+ return true
+ }
+
+ return false
+}
+
+// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
+func (o *Initiator) SetDisplayName(v string) {
+ o.DisplayName = &v
+}
+
+func (o Initiator) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Initiator) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ID) {
+ toSerialize["ID"] = o.ID
+ }
+ if !IsNil(o.DisplayName) {
+ toSerialize["DisplayName"] = o.DisplayName
+ }
+ return toSerialize, nil
+}
+
+type NullableInitiator struct {
+ value *Initiator
+ isSet bool
+}
+
+func (v NullableInitiator) Get() *Initiator {
+ return v.value
+}
+
+func (v *NullableInitiator) Set(val *Initiator) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInitiator) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInitiator) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInitiator(val *Initiator) *NullableInitiator {
+ return &NullableInitiator{value: val, isSet: true}
+}
+
+func (v NullableInitiator) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInitiator) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_input_serialization.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_input_serialization.go
new file mode 100644
index 0000000000..a0de7b38ab
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_input_serialization.go
@@ -0,0 +1,239 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the InputSerialization type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &InputSerialization{}
+
+// InputSerialization Describes the serialization format of the object.
+type InputSerialization struct {
+ XMLName xml.Name `xml:"InputSerialization"`
+ CSV *CSVInput `json:"CSV,omitempty" xml:"CSV"`
+ // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: NONE.
+ CompressionType *string `json:"CompressionType,omitempty" xml:"CompressionType"`
+ JSON *InputSerializationJSON `json:"JSON,omitempty" xml:"JSON"`
+ // Specifies Parquet as object's input serialization format.
+ Parquet map[string]interface{} `json:"Parquet,omitempty" xml:"Parquet"`
+}
+
+// NewInputSerialization instantiates a new InputSerialization object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewInputSerialization() *InputSerialization {
+ this := InputSerialization{}
+
+ return &this
+}
+
+// NewInputSerializationWithDefaults instantiates a new InputSerialization object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewInputSerializationWithDefaults() *InputSerialization {
+ this := InputSerialization{}
+ return &this
+}
+
+// GetCSV returns the CSV field value if set, zero value otherwise.
+func (o *InputSerialization) GetCSV() CSVInput {
+ if o == nil || IsNil(o.CSV) {
+ var ret CSVInput
+ return ret
+ }
+ return *o.CSV
+}
+
+// GetCSVOk returns a tuple with the CSV field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InputSerialization) GetCSVOk() (*CSVInput, bool) {
+ if o == nil || IsNil(o.CSV) {
+ return nil, false
+ }
+ return o.CSV, true
+}
+
+// HasCSV returns a boolean if a field has been set.
+func (o *InputSerialization) HasCSV() bool {
+ if o != nil && !IsNil(o.CSV) {
+ return true
+ }
+
+ return false
+}
+
+// SetCSV gets a reference to the given CSVInput and assigns it to the CSV field.
+func (o *InputSerialization) SetCSV(v CSVInput) {
+ o.CSV = &v
+}
+
+// GetCompressionType returns the CompressionType field value if set, zero value otherwise.
+func (o *InputSerialization) GetCompressionType() string {
+ if o == nil || IsNil(o.CompressionType) {
+ var ret string
+ return ret
+ }
+ return *o.CompressionType
+}
+
+// GetCompressionTypeOk returns a tuple with the CompressionType field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InputSerialization) GetCompressionTypeOk() (*string, bool) {
+ if o == nil || IsNil(o.CompressionType) {
+ return nil, false
+ }
+ return o.CompressionType, true
+}
+
+// HasCompressionType returns a boolean if a field has been set.
+func (o *InputSerialization) HasCompressionType() bool {
+ if o != nil && !IsNil(o.CompressionType) {
+ return true
+ }
+
+ return false
+}
+
+// SetCompressionType gets a reference to the given string and assigns it to the CompressionType field.
+func (o *InputSerialization) SetCompressionType(v string) {
+ o.CompressionType = &v
+}
+
+// GetJSON returns the JSON field value if set, zero value otherwise.
+func (o *InputSerialization) GetJSON() InputSerializationJSON {
+ if o == nil || IsNil(o.JSON) {
+ var ret InputSerializationJSON
+ return ret
+ }
+ return *o.JSON
+}
+
+// GetJSONOk returns a tuple with the JSON field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InputSerialization) GetJSONOk() (*InputSerializationJSON, bool) {
+ if o == nil || IsNil(o.JSON) {
+ return nil, false
+ }
+ return o.JSON, true
+}
+
+// HasJSON returns a boolean if a field has been set.
+func (o *InputSerialization) HasJSON() bool {
+ if o != nil && !IsNil(o.JSON) {
+ return true
+ }
+
+ return false
+}
+
+// SetJSON gets a reference to the given InputSerializationJSON and assigns it to the JSON field.
+func (o *InputSerialization) SetJSON(v InputSerializationJSON) {
+ o.JSON = &v
+}
+
+// GetParquet returns the Parquet field value if set, zero value otherwise.
+func (o *InputSerialization) GetParquet() map[string]interface{} {
+ if o == nil || IsNil(o.Parquet) {
+ var ret map[string]interface{}
+ return ret
+ }
+ return o.Parquet
+}
+
+// GetParquetOk returns a tuple with the Parquet field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InputSerialization) GetParquetOk() (map[string]interface{}, bool) {
+ if o == nil || IsNil(o.Parquet) {
+ return map[string]interface{}{}, false
+ }
+ return o.Parquet, true
+}
+
+// HasParquet returns a boolean if a field has been set.
+func (o *InputSerialization) HasParquet() bool {
+ if o != nil && !IsNil(o.Parquet) {
+ return true
+ }
+
+ return false
+}
+
+// SetParquet gets a reference to the given map[string]interface{} and assigns it to the Parquet field.
+func (o *InputSerialization) SetParquet(v map[string]interface{}) {
+ o.Parquet = v
+}
+
+func (o InputSerialization) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o InputSerialization) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CSV) {
+ toSerialize["CSV"] = o.CSV
+ }
+ if !IsNil(o.CompressionType) {
+ toSerialize["CompressionType"] = o.CompressionType
+ }
+ if !IsNil(o.JSON) {
+ toSerialize["JSON"] = o.JSON
+ }
+ if !IsNil(o.Parquet) {
+ toSerialize["Parquet"] = o.Parquet
+ }
+ return toSerialize, nil
+}
+
+type NullableInputSerialization struct {
+ value *InputSerialization
+ isSet bool
+}
+
+func (v NullableInputSerialization) Get() *InputSerialization {
+ return v.value
+}
+
+func (v *NullableInputSerialization) Set(val *InputSerialization) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInputSerialization) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInputSerialization) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInputSerialization(val *InputSerialization) *NullableInputSerialization {
+ return &NullableInputSerialization{value: val, isSet: true}
+}
+
+func (v NullableInputSerialization) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInputSerialization) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_input_serialization_json.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_input_serialization_json.go
new file mode 100644
index 0000000000..e3af0d82e4
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_input_serialization_json.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the InputSerializationJSON type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &InputSerializationJSON{}
+
+// InputSerializationJSON Specifies JSON as object's input serialization format.
+type InputSerializationJSON struct {
+ XMLName xml.Name `xml:"InputSerializationJSON"`
+ // Specifies JSON as object's input serialization format.
+ Type *string `json:"Type,omitempty" xml:"Type"`
+}
+
+// NewInputSerializationJSON instantiates a new InputSerializationJSON object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewInputSerializationJSON() *InputSerializationJSON {
+ this := InputSerializationJSON{}
+
+ return &this
+}
+
+// NewInputSerializationJSONWithDefaults instantiates a new InputSerializationJSON object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewInputSerializationJSONWithDefaults() *InputSerializationJSON {
+ this := InputSerializationJSON{}
+ return &this
+}
+
+// GetType returns the Type field value if set, zero value otherwise.
+func (o *InputSerializationJSON) GetType() string {
+ if o == nil || IsNil(o.Type) {
+ var ret string
+ return ret
+ }
+ return *o.Type
+}
+
+// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *InputSerializationJSON) GetTypeOk() (*string, bool) {
+ if o == nil || IsNil(o.Type) {
+ return nil, false
+ }
+ return o.Type, true
+}
+
+// HasType returns a boolean if a field has been set.
+func (o *InputSerializationJSON) HasType() bool {
+ if o != nil && !IsNil(o.Type) {
+ return true
+ }
+
+ return false
+}
+
+// SetType gets a reference to the given string and assigns it to the Type field.
+func (o *InputSerializationJSON) SetType(v string) {
+ o.Type = &v
+}
+
+func (o InputSerializationJSON) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o InputSerializationJSON) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Type) {
+ toSerialize["Type"] = o.Type
+ }
+ return toSerialize, nil
+}
+
+type NullableInputSerializationJSON struct {
+ value *InputSerializationJSON
+ isSet bool
+}
+
+func (v NullableInputSerializationJSON) Get() *InputSerializationJSON {
+ return v.value
+}
+
+func (v *NullableInputSerializationJSON) Set(val *InputSerializationJSON) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInputSerializationJSON) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInputSerializationJSON) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInputSerializationJSON(val *InputSerializationJSON) *NullableInputSerializationJSON {
+ return &NullableInputSerializationJSON{value: val, isSet: true}
+}
+
+func (v NullableInputSerializationJSON) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInputSerializationJSON) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_json_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_json_output.go
new file mode 100644
index 0000000000..1924d33480
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_json_output.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the JSONOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &JSONOutput{}
+
+// JSONOutput Specifies JSON as request's output serialization format.
+type JSONOutput struct {
+ XMLName xml.Name `xml:"JSONOutput"`
+ // The value used to separate individual records in the output. If no value is specified, IONOS Object Storage uses a newline character ('\\n').
+ RecordDelimiter *string `json:"RecordDelimiter,omitempty" xml:"RecordDelimiter"`
+}
+
+// NewJSONOutput instantiates a new JSONOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewJSONOutput() *JSONOutput {
+ this := JSONOutput{}
+
+ return &this
+}
+
+// NewJSONOutputWithDefaults instantiates a new JSONOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewJSONOutputWithDefaults() *JSONOutput {
+ this := JSONOutput{}
+ return &this
+}
+
+// GetRecordDelimiter returns the RecordDelimiter field value if set, zero value otherwise.
+func (o *JSONOutput) GetRecordDelimiter() string {
+ if o == nil || IsNil(o.RecordDelimiter) {
+ var ret string
+ return ret
+ }
+ return *o.RecordDelimiter
+}
+
+// GetRecordDelimiterOk returns a tuple with the RecordDelimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *JSONOutput) GetRecordDelimiterOk() (*string, bool) {
+ if o == nil || IsNil(o.RecordDelimiter) {
+ return nil, false
+ }
+ return o.RecordDelimiter, true
+}
+
+// HasRecordDelimiter returns a boolean if a field has been set.
+func (o *JSONOutput) HasRecordDelimiter() bool {
+ if o != nil && !IsNil(o.RecordDelimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetRecordDelimiter gets a reference to the given string and assigns it to the RecordDelimiter field.
+func (o *JSONOutput) SetRecordDelimiter(v string) {
+ o.RecordDelimiter = &v
+}
+
+func (o JSONOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o JSONOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.RecordDelimiter) {
+ toSerialize["RecordDelimiter"] = o.RecordDelimiter
+ }
+ return toSerialize, nil
+}
+
+type NullableJSONOutput struct {
+ value *JSONOutput
+ isSet bool
+}
+
+func (v NullableJSONOutput) Get() *JSONOutput {
+ return v.value
+}
+
+func (v *NullableJSONOutput) Set(val *JSONOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableJSONOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableJSONOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableJSONOutput(val *JSONOutput) *NullableJSONOutput {
+ return &NullableJSONOutput{value: val, isSet: true}
+}
+
+func (v NullableJSONOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableJSONOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_lifecycle_expiration.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_lifecycle_expiration.go
new file mode 100644
index 0000000000..494d48eb79
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_lifecycle_expiration.go
@@ -0,0 +1,204 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the LifecycleExpiration type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &LifecycleExpiration{}
+
+// LifecycleExpiration Specifies when the object expires based on the values defined in the lifecycle configuration.
+type LifecycleExpiration struct {
+ XMLName xml.Name `xml:"Expiration"`
+ // Indicates at what date the object is to be moved or deleted. Should be in GMT ISO 8601 Format.
+ Date *string `json:"Date,omitempty" xml:"Date"`
+ // Indicates the lifetime, in days, of the objects that are subject to the rule. The value must be a non-zero positive integer.
+ Days *int32 `json:"Days,omitempty" xml:"Days"`
+ // Indicates whether IONOS Object Storage will remove a delete marker with no noncurrent versions. If set to true, the delete marker will be expired; if set to false the policy takes no operation. This cannot be specified with Days or Date in a Lifecycle Expiration Policy.
+ ExpiredObjectDeleteMarker *bool `json:"ExpiredObjectDeleteMarker,omitempty" xml:"ExpiredObjectDeleteMarker"`
+}
+
+// NewLifecycleExpiration instantiates a new LifecycleExpiration object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewLifecycleExpiration() *LifecycleExpiration {
+ this := LifecycleExpiration{}
+
+ return &this
+}
+
+// NewLifecycleExpirationWithDefaults instantiates a new LifecycleExpiration object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewLifecycleExpirationWithDefaults() *LifecycleExpiration {
+ this := LifecycleExpiration{}
+ return &this
+}
+
+// GetDate returns the Date field value if set, zero value otherwise.
+func (o *LifecycleExpiration) GetDate() string {
+ if o == nil || IsNil(o.Date) {
+ var ret string
+ return ret
+ }
+ return *o.Date
+}
+
+// GetDateOk returns a tuple with the Date field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LifecycleExpiration) GetDateOk() (*string, bool) {
+ if o == nil || IsNil(o.Date) {
+ return nil, false
+ }
+ return o.Date, true
+}
+
+// HasDate returns a boolean if a field has been set.
+func (o *LifecycleExpiration) HasDate() bool {
+ if o != nil && !IsNil(o.Date) {
+ return true
+ }
+
+ return false
+}
+
+// SetDate gets a reference to the given string and assigns it to the Date field.
+func (o *LifecycleExpiration) SetDate(v string) {
+ o.Date = &v
+}
+
+// GetDays returns the Days field value if set, zero value otherwise.
+func (o *LifecycleExpiration) GetDays() int32 {
+ if o == nil || IsNil(o.Days) {
+ var ret int32
+ return ret
+ }
+ return *o.Days
+}
+
+// GetDaysOk returns a tuple with the Days field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LifecycleExpiration) GetDaysOk() (*int32, bool) {
+ if o == nil || IsNil(o.Days) {
+ return nil, false
+ }
+ return o.Days, true
+}
+
+// HasDays returns a boolean if a field has been set.
+func (o *LifecycleExpiration) HasDays() bool {
+ if o != nil && !IsNil(o.Days) {
+ return true
+ }
+
+ return false
+}
+
+// SetDays gets a reference to the given int32 and assigns it to the Days field.
+func (o *LifecycleExpiration) SetDays(v int32) {
+ o.Days = &v
+}
+
+// GetExpiredObjectDeleteMarker returns the ExpiredObjectDeleteMarker field value if set, zero value otherwise.
+func (o *LifecycleExpiration) GetExpiredObjectDeleteMarker() bool {
+ if o == nil || IsNil(o.ExpiredObjectDeleteMarker) {
+ var ret bool
+ return ret
+ }
+ return *o.ExpiredObjectDeleteMarker
+}
+
+// GetExpiredObjectDeleteMarkerOk returns a tuple with the ExpiredObjectDeleteMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *LifecycleExpiration) GetExpiredObjectDeleteMarkerOk() (*bool, bool) {
+ if o == nil || IsNil(o.ExpiredObjectDeleteMarker) {
+ return nil, false
+ }
+ return o.ExpiredObjectDeleteMarker, true
+}
+
+// HasExpiredObjectDeleteMarker returns a boolean if a field has been set.
+func (o *LifecycleExpiration) HasExpiredObjectDeleteMarker() bool {
+ if o != nil && !IsNil(o.ExpiredObjectDeleteMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetExpiredObjectDeleteMarker gets a reference to the given bool and assigns it to the ExpiredObjectDeleteMarker field.
+func (o *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) {
+ o.ExpiredObjectDeleteMarker = &v
+}
+
+func (o LifecycleExpiration) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o LifecycleExpiration) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Date) {
+ toSerialize["Date"] = o.Date
+ }
+ if !IsNil(o.Days) {
+ toSerialize["Days"] = o.Days
+ }
+ if !IsNil(o.ExpiredObjectDeleteMarker) {
+ toSerialize["ExpiredObjectDeleteMarker"] = o.ExpiredObjectDeleteMarker
+ }
+ return toSerialize, nil
+}
+
+type NullableLifecycleExpiration struct {
+ value *LifecycleExpiration
+ isSet bool
+}
+
+func (v NullableLifecycleExpiration) Get() *LifecycleExpiration {
+ return v.value
+}
+
+func (v *NullableLifecycleExpiration) Set(val *LifecycleExpiration) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableLifecycleExpiration) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableLifecycleExpiration) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableLifecycleExpiration(val *LifecycleExpiration) *NullableLifecycleExpiration {
+ return &NullableLifecycleExpiration{value: val, isSet: true}
+}
+
+func (v NullableLifecycleExpiration) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableLifecycleExpiration) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_all_my_buckets_result.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_all_my_buckets_result.go
new file mode 100644
index 0000000000..35eaca50cb
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_all_my_buckets_result.go
@@ -0,0 +1,165 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ListAllMyBucketsResult type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ListAllMyBucketsResult{}
+
+// ListAllMyBucketsResult struct for ListAllMyBucketsResult
+type ListAllMyBucketsResult struct {
+ XMLName xml.Name `xml:"ListAllMyBucketsResult"`
+ Owner *Owner `json:"Owner,omitempty" xml:"Owner"`
+ Buckets []Bucket `json:"Buckets,omitempty" xml:"Buckets>Bucket"`
+}
+
+// NewListAllMyBucketsResult instantiates a new ListAllMyBucketsResult object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewListAllMyBucketsResult() *ListAllMyBucketsResult {
+ this := ListAllMyBucketsResult{}
+
+ return &this
+}
+
+// NewListAllMyBucketsResultWithDefaults instantiates a new ListAllMyBucketsResult object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewListAllMyBucketsResultWithDefaults() *ListAllMyBucketsResult {
+ this := ListAllMyBucketsResult{}
+ return &this
+}
+
+// GetOwner returns the Owner field value if set, zero value otherwise.
+func (o *ListAllMyBucketsResult) GetOwner() Owner {
+ if o == nil || IsNil(o.Owner) {
+ var ret Owner
+ return ret
+ }
+ return *o.Owner
+}
+
+// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListAllMyBucketsResult) GetOwnerOk() (*Owner, bool) {
+ if o == nil || IsNil(o.Owner) {
+ return nil, false
+ }
+ return o.Owner, true
+}
+
+// HasOwner returns a boolean if a field has been set.
+func (o *ListAllMyBucketsResult) HasOwner() bool {
+ if o != nil && !IsNil(o.Owner) {
+ return true
+ }
+
+ return false
+}
+
+// SetOwner gets a reference to the given Owner and assigns it to the Owner field.
+func (o *ListAllMyBucketsResult) SetOwner(v Owner) {
+ o.Owner = &v
+}
+
+// GetBuckets returns the Buckets field value if set, zero value otherwise.
+func (o *ListAllMyBucketsResult) GetBuckets() []Bucket {
+ if o == nil || IsNil(o.Buckets) {
+ var ret []Bucket
+ return ret
+ }
+ return o.Buckets
+}
+
+// GetBucketsOk returns a tuple with the Buckets field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListAllMyBucketsResult) GetBucketsOk() ([]Bucket, bool) {
+ if o == nil || IsNil(o.Buckets) {
+ return nil, false
+ }
+ return o.Buckets, true
+}
+
+// HasBuckets returns a boolean if a field has been set.
+func (o *ListAllMyBucketsResult) HasBuckets() bool {
+ if o != nil && !IsNil(o.Buckets) {
+ return true
+ }
+
+ return false
+}
+
+// SetBuckets gets a reference to the given []Bucket and assigns it to the Buckets field.
+func (o *ListAllMyBucketsResult) SetBuckets(v []Bucket) {
+ o.Buckets = v
+}
+
+func (o ListAllMyBucketsResult) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ListAllMyBucketsResult) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Owner) {
+ toSerialize["Owner"] = o.Owner
+ }
+ if !IsNil(o.Buckets) {
+ toSerialize["Buckets"] = o.Buckets
+ }
+ return toSerialize, nil
+}
+
+type NullableListAllMyBucketsResult struct {
+ value *ListAllMyBucketsResult
+ isSet bool
+}
+
+func (v NullableListAllMyBucketsResult) Get() *ListAllMyBucketsResult {
+ return v.value
+}
+
+func (v *NullableListAllMyBucketsResult) Set(val *ListAllMyBucketsResult) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableListAllMyBucketsResult) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableListAllMyBucketsResult) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableListAllMyBucketsResult(val *ListAllMyBucketsResult) *NullableListAllMyBucketsResult {
+ return &NullableListAllMyBucketsResult{value: val, isSet: true}
+}
+
+func (v NullableListAllMyBucketsResult) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableListAllMyBucketsResult) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_bucket_result_v2.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_bucket_result_v2.go
new file mode 100644
index 0000000000..16c1730a9a
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_bucket_result_v2.go
@@ -0,0 +1,483 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ListBucketResultV2 type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ListBucketResultV2{}
+
+// ListBucketResultV2 A container for the data.
+type ListBucketResultV2 struct {
+ XMLName xml.Name `xml:"ListBucketResult"`
+ // The bucket name.
+ Name string `json:"Name" xml:"Name"`
+ // Object key prefix that identifies one or more objects to which this rule applies. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ Prefix string `json:"Prefix" xml:"Prefix"`
+ // The maximum number of keys returned in the response. By default the operation returns up to 1000 key names. The response might contain fewer keys but will never contain more.
+ MaxKeys int32 `json:"MaxKeys" xml:"MaxKeys"`
+ // A flag that indicates whether IONOS Object Storage returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.
+ IsTruncated bool `json:"IsTruncated" xml:"IsTruncated"`
+ KeyCount int32 `json:"KeyCount" xml:"KeyCount"`
+ // Metadata about each object returned.
+ Contents []Object `json:"Contents" xml:"Contents"`
+ Delimiter *string `json:"Delimiter,omitempty" xml:"Delimiter"`
+ // All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.
+ CommonPrefixes []CommonPrefix `json:"CommonPrefixes,omitempty" xml:"CommonPrefixes"`
+ EncodingType *EncodingType `json:"EncodingType,omitempty" xml:"EncodingType"`
+ // If ContinuationToken was sent with the request, it is included in the response.
+ ContinuationToken *string `json:"ContinuationToken,omitempty" xml:"ContinuationToken"`
+ // `NextContinuationToken` is sent when `isTruncated` is true, which means there are more keys in the bucket that can be listed. The next list requests to IONOS Object Storage can be continued with this `NextContinuationToken`. `NextContinuationToken` is obfuscated and is not a real key.
+ NextContinuationToken *string `json:"NextContinuationToken,omitempty" xml:"NextContinuationToken"`
+ // If StartAfter was sent with the request, it is included in the response.
+ StartAfter *string `json:"StartAfter,omitempty" xml:"StartAfter"`
+}
+
+// NewListBucketResultV2 instantiates a new ListBucketResultV2 object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewListBucketResultV2(name string, prefix string, maxKeys int32, isTruncated bool, keyCount int32, contents []Object) *ListBucketResultV2 {
+ this := ListBucketResultV2{}
+
+ this.Name = name
+ this.Prefix = prefix
+ this.MaxKeys = maxKeys
+ this.IsTruncated = isTruncated
+ this.KeyCount = keyCount
+ this.Contents = contents
+
+ return &this
+}
+
+// NewListBucketResultV2WithDefaults instantiates a new ListBucketResultV2 object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewListBucketResultV2WithDefaults() *ListBucketResultV2 {
+ this := ListBucketResultV2{}
+ var maxKeys int32 = 1000
+ this.MaxKeys = maxKeys
+ return &this
+}
+
+// GetName returns the Name field value
+func (o *ListBucketResultV2) GetName() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetNameOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Name, true
+}
+
+// SetName sets field value
+func (o *ListBucketResultV2) SetName(v string) {
+ o.Name = v
+}
+
+// GetPrefix returns the Prefix field value
+func (o *ListBucketResultV2) GetPrefix() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Prefix
+}
+
+// GetPrefixOk returns a tuple with the Prefix field value
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetPrefixOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Prefix, true
+}
+
+// SetPrefix sets field value
+func (o *ListBucketResultV2) SetPrefix(v string) {
+ o.Prefix = v
+}
+
+// GetMaxKeys returns the MaxKeys field value
+func (o *ListBucketResultV2) GetMaxKeys() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.MaxKeys
+}
+
+// GetMaxKeysOk returns a tuple with the MaxKeys field value
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetMaxKeysOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.MaxKeys, true
+}
+
+// SetMaxKeys sets field value
+func (o *ListBucketResultV2) SetMaxKeys(v int32) {
+ o.MaxKeys = v
+}
+
+// GetIsTruncated returns the IsTruncated field value
+func (o *ListBucketResultV2) GetIsTruncated() bool {
+ if o == nil {
+ var ret bool
+ return ret
+ }
+
+ return o.IsTruncated
+}
+
+// GetIsTruncatedOk returns a tuple with the IsTruncated field value
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetIsTruncatedOk() (*bool, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.IsTruncated, true
+}
+
+// SetIsTruncated sets field value
+func (o *ListBucketResultV2) SetIsTruncated(v bool) {
+ o.IsTruncated = v
+}
+
+// GetKeyCount returns the KeyCount field value
+func (o *ListBucketResultV2) GetKeyCount() int32 {
+ if o == nil {
+ var ret int32
+ return ret
+ }
+
+ return o.KeyCount
+}
+
+// GetKeyCountOk returns a tuple with the KeyCount field value
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetKeyCountOk() (*int32, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.KeyCount, true
+}
+
+// SetKeyCount sets field value
+func (o *ListBucketResultV2) SetKeyCount(v int32) {
+ o.KeyCount = v
+}
+
+// GetContents returns the Contents field value
+func (o *ListBucketResultV2) GetContents() []Object {
+ if o == nil {
+ var ret []Object
+ return ret
+ }
+
+ return o.Contents
+}
+
+// GetContentsOk returns a tuple with the Contents field value
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetContentsOk() ([]Object, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.Contents, true
+}
+
+// SetContents sets field value
+func (o *ListBucketResultV2) SetContents(v []Object) {
+ o.Contents = v
+}
+
+// GetDelimiter returns the Delimiter field value if set, zero value otherwise.
+func (o *ListBucketResultV2) GetDelimiter() string {
+ if o == nil || IsNil(o.Delimiter) {
+ var ret string
+ return ret
+ }
+ return *o.Delimiter
+}
+
+// GetDelimiterOk returns a tuple with the Delimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetDelimiterOk() (*string, bool) {
+ if o == nil || IsNil(o.Delimiter) {
+ return nil, false
+ }
+ return o.Delimiter, true
+}
+
+// HasDelimiter returns a boolean if a field has been set.
+func (o *ListBucketResultV2) HasDelimiter() bool {
+ if o != nil && !IsNil(o.Delimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetDelimiter gets a reference to the given string and assigns it to the Delimiter field.
+func (o *ListBucketResultV2) SetDelimiter(v string) {
+ o.Delimiter = &v
+}
+
+// GetCommonPrefixes returns the CommonPrefixes field value if set, zero value otherwise.
+func (o *ListBucketResultV2) GetCommonPrefixes() []CommonPrefix {
+ if o == nil || IsNil(o.CommonPrefixes) {
+ var ret []CommonPrefix
+ return ret
+ }
+ return o.CommonPrefixes
+}
+
+// GetCommonPrefixesOk returns a tuple with the CommonPrefixes field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetCommonPrefixesOk() ([]CommonPrefix, bool) {
+ if o == nil || IsNil(o.CommonPrefixes) {
+ return nil, false
+ }
+ return o.CommonPrefixes, true
+}
+
+// HasCommonPrefixes returns a boolean if a field has been set.
+func (o *ListBucketResultV2) HasCommonPrefixes() bool {
+ if o != nil && !IsNil(o.CommonPrefixes) {
+ return true
+ }
+
+ return false
+}
+
+// SetCommonPrefixes gets a reference to the given []CommonPrefix and assigns it to the CommonPrefixes field.
+func (o *ListBucketResultV2) SetCommonPrefixes(v []CommonPrefix) {
+ o.CommonPrefixes = v
+}
+
+// GetEncodingType returns the EncodingType field value if set, zero value otherwise.
+func (o *ListBucketResultV2) GetEncodingType() EncodingType {
+ if o == nil || IsNil(o.EncodingType) {
+ var ret EncodingType
+ return ret
+ }
+ return *o.EncodingType
+}
+
+// GetEncodingTypeOk returns a tuple with the EncodingType field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetEncodingTypeOk() (*EncodingType, bool) {
+ if o == nil || IsNil(o.EncodingType) {
+ return nil, false
+ }
+ return o.EncodingType, true
+}
+
+// HasEncodingType returns a boolean if a field has been set.
+func (o *ListBucketResultV2) HasEncodingType() bool {
+ if o != nil && !IsNil(o.EncodingType) {
+ return true
+ }
+
+ return false
+}
+
+// SetEncodingType gets a reference to the given EncodingType and assigns it to the EncodingType field.
+func (o *ListBucketResultV2) SetEncodingType(v EncodingType) {
+ o.EncodingType = &v
+}
+
+// GetContinuationToken returns the ContinuationToken field value if set, zero value otherwise.
+func (o *ListBucketResultV2) GetContinuationToken() string {
+ if o == nil || IsNil(o.ContinuationToken) {
+ var ret string
+ return ret
+ }
+ return *o.ContinuationToken
+}
+
+// GetContinuationTokenOk returns a tuple with the ContinuationToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetContinuationTokenOk() (*string, bool) {
+ if o == nil || IsNil(o.ContinuationToken) {
+ return nil, false
+ }
+ return o.ContinuationToken, true
+}
+
+// HasContinuationToken returns a boolean if a field has been set.
+func (o *ListBucketResultV2) HasContinuationToken() bool {
+ if o != nil && !IsNil(o.ContinuationToken) {
+ return true
+ }
+
+ return false
+}
+
+// SetContinuationToken gets a reference to the given string and assigns it to the ContinuationToken field.
+func (o *ListBucketResultV2) SetContinuationToken(v string) {
+ o.ContinuationToken = &v
+}
+
+// GetNextContinuationToken returns the NextContinuationToken field value if set, zero value otherwise.
+func (o *ListBucketResultV2) GetNextContinuationToken() string {
+ if o == nil || IsNil(o.NextContinuationToken) {
+ var ret string
+ return ret
+ }
+ return *o.NextContinuationToken
+}
+
+// GetNextContinuationTokenOk returns a tuple with the NextContinuationToken field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetNextContinuationTokenOk() (*string, bool) {
+ if o == nil || IsNil(o.NextContinuationToken) {
+ return nil, false
+ }
+ return o.NextContinuationToken, true
+}
+
+// HasNextContinuationToken returns a boolean if a field has been set.
+func (o *ListBucketResultV2) HasNextContinuationToken() bool {
+ if o != nil && !IsNil(o.NextContinuationToken) {
+ return true
+ }
+
+ return false
+}
+
+// SetNextContinuationToken gets a reference to the given string and assigns it to the NextContinuationToken field.
+func (o *ListBucketResultV2) SetNextContinuationToken(v string) {
+ o.NextContinuationToken = &v
+}
+
+// GetStartAfter returns the StartAfter field value if set, zero value otherwise.
+func (o *ListBucketResultV2) GetStartAfter() string {
+ if o == nil || IsNil(o.StartAfter) {
+ var ret string
+ return ret
+ }
+ return *o.StartAfter
+}
+
+// GetStartAfterOk returns a tuple with the StartAfter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListBucketResultV2) GetStartAfterOk() (*string, bool) {
+ if o == nil || IsNil(o.StartAfter) {
+ return nil, false
+ }
+ return o.StartAfter, true
+}
+
+// HasStartAfter returns a boolean if a field has been set.
+func (o *ListBucketResultV2) HasStartAfter() bool {
+ if o != nil && !IsNil(o.StartAfter) {
+ return true
+ }
+
+ return false
+}
+
+// SetStartAfter gets a reference to the given string and assigns it to the StartAfter field.
+func (o *ListBucketResultV2) SetStartAfter(v string) {
+ o.StartAfter = &v
+}
+
+func (o ListBucketResultV2) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ListBucketResultV2) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Name"] = o.Name
+ toSerialize["Prefix"] = o.Prefix
+ toSerialize["MaxKeys"] = o.MaxKeys
+ toSerialize["IsTruncated"] = o.IsTruncated
+ toSerialize["KeyCount"] = o.KeyCount
+ toSerialize["Contents"] = o.Contents
+ if !IsNil(o.Delimiter) {
+ toSerialize["Delimiter"] = o.Delimiter
+ }
+ if !IsNil(o.CommonPrefixes) {
+ toSerialize["CommonPrefixes"] = o.CommonPrefixes
+ }
+ if !IsNil(o.EncodingType) {
+ toSerialize["EncodingType"] = o.EncodingType
+ }
+ if !IsNil(o.ContinuationToken) {
+ toSerialize["ContinuationToken"] = o.ContinuationToken
+ }
+ if !IsNil(o.NextContinuationToken) {
+ toSerialize["NextContinuationToken"] = o.NextContinuationToken
+ }
+ if !IsNil(o.StartAfter) {
+ toSerialize["StartAfter"] = o.StartAfter
+ }
+ return toSerialize, nil
+}
+
+type NullableListBucketResultV2 struct {
+ value *ListBucketResultV2
+ isSet bool
+}
+
+func (v NullableListBucketResultV2) Get() *ListBucketResultV2 {
+ return v.value
+}
+
+func (v *NullableListBucketResultV2) Set(val *ListBucketResultV2) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableListBucketResultV2) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableListBucketResultV2) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableListBucketResultV2(val *ListBucketResultV2) *NullableListBucketResultV2 {
+ return &NullableListBucketResultV2{value: val, isSet: true}
+}
+
+func (v NullableListBucketResultV2) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableListBucketResultV2) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_multipart_uploads_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_multipart_uploads_output.go
new file mode 100644
index 0000000000..7bf199ae3e
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_multipart_uploads_output.go
@@ -0,0 +1,536 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ListMultipartUploadsOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ListMultipartUploadsOutput{}
+
+// ListMultipartUploadsOutput struct for ListMultipartUploadsOutput
+type ListMultipartUploadsOutput struct {
+ XMLName xml.Name `xml:"ListMultipartUploadsOutput"`
+ // The bucket name.
+ Bucket *string `json:"Bucket,omitempty" xml:"Name"`
+ // The key at or after which the listing began.
+ KeyMarker *string `json:"KeyMarker,omitempty" xml:"KeyMarker"`
+ // Upload ID after which listing began.
+ UploadIdMarker *string `json:"UploadIdMarker,omitempty" xml:"UploadIdMarker"`
+ // When a list is truncated, this element specifies the value that should be used for the key-marker request parameter in a subsequent request.
+ NextKeyMarker *string `json:"NextKeyMarker,omitempty" xml:"NextKeyMarker"`
+ // When a prefix is provided in the request, this field contains the specified prefix. The result contains only keys starting with the specified prefix.
+ Prefix *string `json:"Prefix,omitempty" xml:"Prefix"`
+ // Contains the delimiter you specified in the request. If you don't specify a delimiter in your request, this element is absent from the response.
+ Delimiter *string `json:"Delimiter,omitempty" xml:"Delimiter"`
+ // When a list is truncated, this element specifies the value that should be used for the `upload-id-marker` request parameter in a subsequent request.
+ NextUploadIdMarker *string `json:"NextUploadIdMarker,omitempty" xml:"NextUploadIdMarker"`
+ // Maximum number of multipart uploads that could have been included in the response.
+ MaxUploads *int32 `json:"MaxUploads,omitempty" xml:"MaxUploads"`
+ // A flag that indicates whether IONOS Object Storage returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.
+ IsTruncated *bool `json:"IsTruncated,omitempty" xml:"IsTruncated"`
+ // Container for elements related to a particular multipart upload. A response can contain zero or more `Upload` elements.
+ Uploads []MultipartUpload `json:"Uploads,omitempty" xml:"Uploads"`
+ // All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.
+ CommonPrefixes []CommonPrefix `json:"CommonPrefixes,omitempty" xml:"CommonPrefixes"`
+ EncodingType *EncodingType `json:"EncodingType,omitempty" xml:"EncodingType"`
+}
+
+// NewListMultipartUploadsOutput instantiates a new ListMultipartUploadsOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewListMultipartUploadsOutput() *ListMultipartUploadsOutput {
+ this := ListMultipartUploadsOutput{}
+
+ return &this
+}
+
+// NewListMultipartUploadsOutputWithDefaults instantiates a new ListMultipartUploadsOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewListMultipartUploadsOutputWithDefaults() *ListMultipartUploadsOutput {
+ this := ListMultipartUploadsOutput{}
+ return &this
+}
+
+// GetBucket returns the Bucket field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetBucket() string {
+ if o == nil || IsNil(o.Bucket) {
+ var ret string
+ return ret
+ }
+ return *o.Bucket
+}
+
+// GetBucketOk returns a tuple with the Bucket field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetBucketOk() (*string, bool) {
+ if o == nil || IsNil(o.Bucket) {
+ return nil, false
+ }
+ return o.Bucket, true
+}
+
+// HasBucket returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasBucket() bool {
+ if o != nil && !IsNil(o.Bucket) {
+ return true
+ }
+
+ return false
+}
+
+// SetBucket gets a reference to the given string and assigns it to the Bucket field.
+func (o *ListMultipartUploadsOutput) SetBucket(v string) {
+ o.Bucket = &v
+}
+
+// GetKeyMarker returns the KeyMarker field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetKeyMarker() string {
+ if o == nil || IsNil(o.KeyMarker) {
+ var ret string
+ return ret
+ }
+ return *o.KeyMarker
+}
+
+// GetKeyMarkerOk returns a tuple with the KeyMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetKeyMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.KeyMarker) {
+ return nil, false
+ }
+ return o.KeyMarker, true
+}
+
+// HasKeyMarker returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasKeyMarker() bool {
+ if o != nil && !IsNil(o.KeyMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetKeyMarker gets a reference to the given string and assigns it to the KeyMarker field.
+func (o *ListMultipartUploadsOutput) SetKeyMarker(v string) {
+ o.KeyMarker = &v
+}
+
+// GetUploadIdMarker returns the UploadIdMarker field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetUploadIdMarker() string {
+ if o == nil || IsNil(o.UploadIdMarker) {
+ var ret string
+ return ret
+ }
+ return *o.UploadIdMarker
+}
+
+// GetUploadIdMarkerOk returns a tuple with the UploadIdMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetUploadIdMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.UploadIdMarker) {
+ return nil, false
+ }
+ return o.UploadIdMarker, true
+}
+
+// HasUploadIdMarker returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasUploadIdMarker() bool {
+ if o != nil && !IsNil(o.UploadIdMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetUploadIdMarker gets a reference to the given string and assigns it to the UploadIdMarker field.
+func (o *ListMultipartUploadsOutput) SetUploadIdMarker(v string) {
+ o.UploadIdMarker = &v
+}
+
+// GetNextKeyMarker returns the NextKeyMarker field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetNextKeyMarker() string {
+ if o == nil || IsNil(o.NextKeyMarker) {
+ var ret string
+ return ret
+ }
+ return *o.NextKeyMarker
+}
+
+// GetNextKeyMarkerOk returns a tuple with the NextKeyMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetNextKeyMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.NextKeyMarker) {
+ return nil, false
+ }
+ return o.NextKeyMarker, true
+}
+
+// HasNextKeyMarker returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasNextKeyMarker() bool {
+ if o != nil && !IsNil(o.NextKeyMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetNextKeyMarker gets a reference to the given string and assigns it to the NextKeyMarker field.
+func (o *ListMultipartUploadsOutput) SetNextKeyMarker(v string) {
+ o.NextKeyMarker = &v
+}
+
+// GetPrefix returns the Prefix field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetPrefix() string {
+ if o == nil || IsNil(o.Prefix) {
+ var ret string
+ return ret
+ }
+ return *o.Prefix
+}
+
+// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetPrefixOk() (*string, bool) {
+ if o == nil || IsNil(o.Prefix) {
+ return nil, false
+ }
+ return o.Prefix, true
+}
+
+// HasPrefix returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasPrefix() bool {
+ if o != nil && !IsNil(o.Prefix) {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefix gets a reference to the given string and assigns it to the Prefix field.
+func (o *ListMultipartUploadsOutput) SetPrefix(v string) {
+ o.Prefix = &v
+}
+
+// GetDelimiter returns the Delimiter field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetDelimiter() string {
+ if o == nil || IsNil(o.Delimiter) {
+ var ret string
+ return ret
+ }
+ return *o.Delimiter
+}
+
+// GetDelimiterOk returns a tuple with the Delimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetDelimiterOk() (*string, bool) {
+ if o == nil || IsNil(o.Delimiter) {
+ return nil, false
+ }
+ return o.Delimiter, true
+}
+
+// HasDelimiter returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasDelimiter() bool {
+ if o != nil && !IsNil(o.Delimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetDelimiter gets a reference to the given string and assigns it to the Delimiter field.
+func (o *ListMultipartUploadsOutput) SetDelimiter(v string) {
+ o.Delimiter = &v
+}
+
+// GetNextUploadIdMarker returns the NextUploadIdMarker field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetNextUploadIdMarker() string {
+ if o == nil || IsNil(o.NextUploadIdMarker) {
+ var ret string
+ return ret
+ }
+ return *o.NextUploadIdMarker
+}
+
+// GetNextUploadIdMarkerOk returns a tuple with the NextUploadIdMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetNextUploadIdMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.NextUploadIdMarker) {
+ return nil, false
+ }
+ return o.NextUploadIdMarker, true
+}
+
+// HasNextUploadIdMarker returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasNextUploadIdMarker() bool {
+ if o != nil && !IsNil(o.NextUploadIdMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetNextUploadIdMarker gets a reference to the given string and assigns it to the NextUploadIdMarker field.
+func (o *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) {
+ o.NextUploadIdMarker = &v
+}
+
+// GetMaxUploads returns the MaxUploads field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetMaxUploads() int32 {
+ if o == nil || IsNil(o.MaxUploads) {
+ var ret int32
+ return ret
+ }
+ return *o.MaxUploads
+}
+
+// GetMaxUploadsOk returns a tuple with the MaxUploads field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetMaxUploadsOk() (*int32, bool) {
+ if o == nil || IsNil(o.MaxUploads) {
+ return nil, false
+ }
+ return o.MaxUploads, true
+}
+
+// HasMaxUploads returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasMaxUploads() bool {
+ if o != nil && !IsNil(o.MaxUploads) {
+ return true
+ }
+
+ return false
+}
+
+// SetMaxUploads gets a reference to the given int32 and assigns it to the MaxUploads field.
+func (o *ListMultipartUploadsOutput) SetMaxUploads(v int32) {
+ o.MaxUploads = &v
+}
+
+// GetIsTruncated returns the IsTruncated field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetIsTruncated() bool {
+ if o == nil || IsNil(o.IsTruncated) {
+ var ret bool
+ return ret
+ }
+ return *o.IsTruncated
+}
+
+// GetIsTruncatedOk returns a tuple with the IsTruncated field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetIsTruncatedOk() (*bool, bool) {
+ if o == nil || IsNil(o.IsTruncated) {
+ return nil, false
+ }
+ return o.IsTruncated, true
+}
+
+// HasIsTruncated returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasIsTruncated() bool {
+ if o != nil && !IsNil(o.IsTruncated) {
+ return true
+ }
+
+ return false
+}
+
+// SetIsTruncated gets a reference to the given bool and assigns it to the IsTruncated field.
+func (o *ListMultipartUploadsOutput) SetIsTruncated(v bool) {
+ o.IsTruncated = &v
+}
+
+// GetUploads returns the Uploads field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetUploads() []MultipartUpload {
+ if o == nil || IsNil(o.Uploads) {
+ var ret []MultipartUpload
+ return ret
+ }
+ return o.Uploads
+}
+
+// GetUploadsOk returns a tuple with the Uploads field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetUploadsOk() ([]MultipartUpload, bool) {
+ if o == nil || IsNil(o.Uploads) {
+ return nil, false
+ }
+ return o.Uploads, true
+}
+
+// HasUploads returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasUploads() bool {
+ if o != nil && !IsNil(o.Uploads) {
+ return true
+ }
+
+ return false
+}
+
+// SetUploads gets a reference to the given []MultipartUpload and assigns it to the Uploads field.
+func (o *ListMultipartUploadsOutput) SetUploads(v []MultipartUpload) {
+ o.Uploads = v
+}
+
+// GetCommonPrefixes returns the CommonPrefixes field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetCommonPrefixes() []CommonPrefix {
+ if o == nil || IsNil(o.CommonPrefixes) {
+ var ret []CommonPrefix
+ return ret
+ }
+ return o.CommonPrefixes
+}
+
+// GetCommonPrefixesOk returns a tuple with the CommonPrefixes field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetCommonPrefixesOk() ([]CommonPrefix, bool) {
+ if o == nil || IsNil(o.CommonPrefixes) {
+ return nil, false
+ }
+ return o.CommonPrefixes, true
+}
+
+// HasCommonPrefixes returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasCommonPrefixes() bool {
+ if o != nil && !IsNil(o.CommonPrefixes) {
+ return true
+ }
+
+ return false
+}
+
+// SetCommonPrefixes gets a reference to the given []CommonPrefix and assigns it to the CommonPrefixes field.
+func (o *ListMultipartUploadsOutput) SetCommonPrefixes(v []CommonPrefix) {
+ o.CommonPrefixes = v
+}
+
+// GetEncodingType returns the EncodingType field value if set, zero value otherwise.
+func (o *ListMultipartUploadsOutput) GetEncodingType() EncodingType {
+ if o == nil || IsNil(o.EncodingType) {
+ var ret EncodingType
+ return ret
+ }
+ return *o.EncodingType
+}
+
+// GetEncodingTypeOk returns a tuple with the EncodingType field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListMultipartUploadsOutput) GetEncodingTypeOk() (*EncodingType, bool) {
+ if o == nil || IsNil(o.EncodingType) {
+ return nil, false
+ }
+ return o.EncodingType, true
+}
+
+// HasEncodingType returns a boolean if a field has been set.
+func (o *ListMultipartUploadsOutput) HasEncodingType() bool {
+ if o != nil && !IsNil(o.EncodingType) {
+ return true
+ }
+
+ return false
+}
+
+// SetEncodingType gets a reference to the given EncodingType and assigns it to the EncodingType field.
+func (o *ListMultipartUploadsOutput) SetEncodingType(v EncodingType) {
+ o.EncodingType = &v
+}
+
+func (o ListMultipartUploadsOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ListMultipartUploadsOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Bucket) {
+ toSerialize["Bucket"] = o.Bucket
+ }
+ if !IsNil(o.KeyMarker) {
+ toSerialize["KeyMarker"] = o.KeyMarker
+ }
+ if !IsNil(o.UploadIdMarker) {
+ toSerialize["UploadIdMarker"] = o.UploadIdMarker
+ }
+ if !IsNil(o.NextKeyMarker) {
+ toSerialize["NextKeyMarker"] = o.NextKeyMarker
+ }
+ if !IsNil(o.Prefix) {
+ toSerialize["Prefix"] = o.Prefix
+ }
+ if !IsNil(o.Delimiter) {
+ toSerialize["Delimiter"] = o.Delimiter
+ }
+ if !IsNil(o.NextUploadIdMarker) {
+ toSerialize["NextUploadIdMarker"] = o.NextUploadIdMarker
+ }
+ if !IsNil(o.MaxUploads) {
+ toSerialize["MaxUploads"] = o.MaxUploads
+ }
+ if !IsNil(o.IsTruncated) {
+ toSerialize["IsTruncated"] = o.IsTruncated
+ }
+ if !IsNil(o.Uploads) {
+ toSerialize["Uploads"] = o.Uploads
+ }
+ if !IsNil(o.CommonPrefixes) {
+ toSerialize["CommonPrefixes"] = o.CommonPrefixes
+ }
+ if !IsNil(o.EncodingType) {
+ toSerialize["EncodingType"] = o.EncodingType
+ }
+ return toSerialize, nil
+}
+
+type NullableListMultipartUploadsOutput struct {
+ value *ListMultipartUploadsOutput
+ isSet bool
+}
+
+func (v NullableListMultipartUploadsOutput) Get() *ListMultipartUploadsOutput {
+ return v.value
+}
+
+func (v *NullableListMultipartUploadsOutput) Set(val *ListMultipartUploadsOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableListMultipartUploadsOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableListMultipartUploadsOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableListMultipartUploadsOutput(val *ListMultipartUploadsOutput) *NullableListMultipartUploadsOutput {
+ return &NullableListMultipartUploadsOutput{value: val, isSet: true}
+}
+
+func (v NullableListMultipartUploadsOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableListMultipartUploadsOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_object_versions_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_object_versions_output.go
new file mode 100644
index 0000000000..0b9158fbc3
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_object_versions_output.go
@@ -0,0 +1,571 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ListObjectVersionsOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ListObjectVersionsOutput{}
+
+// ListObjectVersionsOutput struct for ListObjectVersionsOutput
+type ListObjectVersionsOutput struct {
+ XMLName xml.Name `xml:"ListVersionsResult"`
+ // A flag that indicates whether IONOS Object Storage returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.
+ IsTruncated *bool `json:"IsTruncated,omitempty" xml:"IsTruncated"`
+ // Marks the last key returned in a truncated response.
+ KeyMarker *string `json:"KeyMarker,omitempty" xml:"KeyMarker"`
+ // Marks the last version of the key returned in a truncated response.
+ VersionIdMarker *string `json:"VersionIdMarker,omitempty" xml:"VersionIdMarker"`
+ // When the number of responses exceeds the value of `MaxKeys`, `NextKeyMarker` specifies the first key not returned that satisfies the search criteria. Use this value for the key-marker request parameter in a subsequent request.
+ NextKeyMarker *string `json:"NextKeyMarker,omitempty" xml:"NextKeyMarker"`
+ // When the number of responses exceeds the value of `MaxKeys`, `NextVersionIdMarker` specifies the first object version not returned that satisfies the search criteria. Use this value for the version-id-marker request parameter in a subsequent request.
+ NextVersionIdMarker *string `json:"NextVersionIdMarker,omitempty" xml:"NextVersionIdMarker"`
+ // Container for version information.
+ Versions []ObjectVersion `json:"Versions,omitempty" xml:"Version"`
+ DeleteMarkers []DeleteMarkerEntry `json:"DeleteMarkers,omitempty" xml:"DeleteMarker"`
+ // The bucket name.
+ Name *string `json:"Name,omitempty" xml:"Name"`
+ // Selects objects that start with the value supplied by this parameter.
+ Prefix *string `json:"Prefix,omitempty" xml:"Prefix"`
+ Delimiter *string `json:"Delimiter,omitempty" xml:"Delimiter"`
+ // The maximum number of keys returned in the response. By default the operation returns up to 1000 key names. The response might contain fewer keys but will never contain more.
+ MaxKeys *int32 `json:"MaxKeys,omitempty" xml:"MaxKeys"`
+ // All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.
+ CommonPrefixes []CommonPrefix `json:"CommonPrefixes,omitempty" xml:"CommonPrefixes"`
+ EncodingType *EncodingType `json:"EncodingType,omitempty" xml:"EncodingType"`
+}
+
+// NewListObjectVersionsOutput instantiates a new ListObjectVersionsOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewListObjectVersionsOutput() *ListObjectVersionsOutput {
+ this := ListObjectVersionsOutput{}
+
+ return &this
+}
+
+// NewListObjectVersionsOutputWithDefaults instantiates a new ListObjectVersionsOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewListObjectVersionsOutputWithDefaults() *ListObjectVersionsOutput {
+ this := ListObjectVersionsOutput{}
+ return &this
+}
+
+// GetIsTruncated returns the IsTruncated field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetIsTruncated() bool {
+ if o == nil || IsNil(o.IsTruncated) {
+ var ret bool
+ return ret
+ }
+ return *o.IsTruncated
+}
+
+// GetIsTruncatedOk returns a tuple with the IsTruncated field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetIsTruncatedOk() (*bool, bool) {
+ if o == nil || IsNil(o.IsTruncated) {
+ return nil, false
+ }
+ return o.IsTruncated, true
+}
+
+// HasIsTruncated returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasIsTruncated() bool {
+ if o != nil && !IsNil(o.IsTruncated) {
+ return true
+ }
+
+ return false
+}
+
+// SetIsTruncated gets a reference to the given bool and assigns it to the IsTruncated field.
+func (o *ListObjectVersionsOutput) SetIsTruncated(v bool) {
+ o.IsTruncated = &v
+}
+
+// GetKeyMarker returns the KeyMarker field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetKeyMarker() string {
+ if o == nil || IsNil(o.KeyMarker) {
+ var ret string
+ return ret
+ }
+ return *o.KeyMarker
+}
+
+// GetKeyMarkerOk returns a tuple with the KeyMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetKeyMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.KeyMarker) {
+ return nil, false
+ }
+ return o.KeyMarker, true
+}
+
+// HasKeyMarker returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasKeyMarker() bool {
+ if o != nil && !IsNil(o.KeyMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetKeyMarker gets a reference to the given string and assigns it to the KeyMarker field.
+func (o *ListObjectVersionsOutput) SetKeyMarker(v string) {
+ o.KeyMarker = &v
+}
+
+// GetVersionIdMarker returns the VersionIdMarker field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetVersionIdMarker() string {
+ if o == nil || IsNil(o.VersionIdMarker) {
+ var ret string
+ return ret
+ }
+ return *o.VersionIdMarker
+}
+
+// GetVersionIdMarkerOk returns a tuple with the VersionIdMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetVersionIdMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.VersionIdMarker) {
+ return nil, false
+ }
+ return o.VersionIdMarker, true
+}
+
+// HasVersionIdMarker returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasVersionIdMarker() bool {
+ if o != nil && !IsNil(o.VersionIdMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersionIdMarker gets a reference to the given string and assigns it to the VersionIdMarker field.
+func (o *ListObjectVersionsOutput) SetVersionIdMarker(v string) {
+ o.VersionIdMarker = &v
+}
+
+// GetNextKeyMarker returns the NextKeyMarker field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetNextKeyMarker() string {
+ if o == nil || IsNil(o.NextKeyMarker) {
+ var ret string
+ return ret
+ }
+ return *o.NextKeyMarker
+}
+
+// GetNextKeyMarkerOk returns a tuple with the NextKeyMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetNextKeyMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.NextKeyMarker) {
+ return nil, false
+ }
+ return o.NextKeyMarker, true
+}
+
+// HasNextKeyMarker returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasNextKeyMarker() bool {
+ if o != nil && !IsNil(o.NextKeyMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetNextKeyMarker gets a reference to the given string and assigns it to the NextKeyMarker field.
+func (o *ListObjectVersionsOutput) SetNextKeyMarker(v string) {
+ o.NextKeyMarker = &v
+}
+
+// GetNextVersionIdMarker returns the NextVersionIdMarker field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetNextVersionIdMarker() string {
+ if o == nil || IsNil(o.NextVersionIdMarker) {
+ var ret string
+ return ret
+ }
+ return *o.NextVersionIdMarker
+}
+
+// GetNextVersionIdMarkerOk returns a tuple with the NextVersionIdMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetNextVersionIdMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.NextVersionIdMarker) {
+ return nil, false
+ }
+ return o.NextVersionIdMarker, true
+}
+
+// HasNextVersionIdMarker returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasNextVersionIdMarker() bool {
+ if o != nil && !IsNil(o.NextVersionIdMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetNextVersionIdMarker gets a reference to the given string and assigns it to the NextVersionIdMarker field.
+func (o *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) {
+ o.NextVersionIdMarker = &v
+}
+
+// GetVersions returns the Versions field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetVersions() []ObjectVersion {
+ if o == nil || IsNil(o.Versions) {
+ var ret []ObjectVersion
+ return ret
+ }
+ return o.Versions
+}
+
+// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetVersionsOk() ([]ObjectVersion, bool) {
+ if o == nil || IsNil(o.Versions) {
+ return nil, false
+ }
+ return o.Versions, true
+}
+
+// HasVersions returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasVersions() bool {
+ if o != nil && !IsNil(o.Versions) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersions gets a reference to the given []ObjectVersion and assigns it to the Versions field.
+func (o *ListObjectVersionsOutput) SetVersions(v []ObjectVersion) {
+ o.Versions = v
+}
+
+// GetDeleteMarkers returns the DeleteMarkers field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetDeleteMarkers() []DeleteMarkerEntry {
+ if o == nil || IsNil(o.DeleteMarkers) {
+ var ret []DeleteMarkerEntry
+ return ret
+ }
+ return o.DeleteMarkers
+}
+
+// GetDeleteMarkersOk returns a tuple with the DeleteMarkers field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetDeleteMarkersOk() ([]DeleteMarkerEntry, bool) {
+ if o == nil || IsNil(o.DeleteMarkers) {
+ return nil, false
+ }
+ return o.DeleteMarkers, true
+}
+
+// HasDeleteMarkers returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasDeleteMarkers() bool {
+ if o != nil && !IsNil(o.DeleteMarkers) {
+ return true
+ }
+
+ return false
+}
+
+// SetDeleteMarkers gets a reference to the given []DeleteMarkerEntry and assigns it to the DeleteMarkers field.
+func (o *ListObjectVersionsOutput) SetDeleteMarkers(v []DeleteMarkerEntry) {
+ o.DeleteMarkers = v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ListObjectVersionsOutput) SetName(v string) {
+ o.Name = &v
+}
+
+// GetPrefix returns the Prefix field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetPrefix() string {
+ if o == nil || IsNil(o.Prefix) {
+ var ret string
+ return ret
+ }
+ return *o.Prefix
+}
+
+// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetPrefixOk() (*string, bool) {
+ if o == nil || IsNil(o.Prefix) {
+ return nil, false
+ }
+ return o.Prefix, true
+}
+
+// HasPrefix returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasPrefix() bool {
+ if o != nil && !IsNil(o.Prefix) {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefix gets a reference to the given string and assigns it to the Prefix field.
+func (o *ListObjectVersionsOutput) SetPrefix(v string) {
+ o.Prefix = &v
+}
+
+// GetDelimiter returns the Delimiter field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetDelimiter() string {
+ if o == nil || IsNil(o.Delimiter) {
+ var ret string
+ return ret
+ }
+ return *o.Delimiter
+}
+
+// GetDelimiterOk returns a tuple with the Delimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetDelimiterOk() (*string, bool) {
+ if o == nil || IsNil(o.Delimiter) {
+ return nil, false
+ }
+ return o.Delimiter, true
+}
+
+// HasDelimiter returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasDelimiter() bool {
+ if o != nil && !IsNil(o.Delimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetDelimiter gets a reference to the given string and assigns it to the Delimiter field.
+func (o *ListObjectVersionsOutput) SetDelimiter(v string) {
+ o.Delimiter = &v
+}
+
+// GetMaxKeys returns the MaxKeys field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetMaxKeys() int32 {
+ if o == nil || IsNil(o.MaxKeys) {
+ var ret int32
+ return ret
+ }
+ return *o.MaxKeys
+}
+
+// GetMaxKeysOk returns a tuple with the MaxKeys field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetMaxKeysOk() (*int32, bool) {
+ if o == nil || IsNil(o.MaxKeys) {
+ return nil, false
+ }
+ return o.MaxKeys, true
+}
+
+// HasMaxKeys returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasMaxKeys() bool {
+ if o != nil && !IsNil(o.MaxKeys) {
+ return true
+ }
+
+ return false
+}
+
+// SetMaxKeys gets a reference to the given int32 and assigns it to the MaxKeys field.
+func (o *ListObjectVersionsOutput) SetMaxKeys(v int32) {
+ o.MaxKeys = &v
+}
+
+// GetCommonPrefixes returns the CommonPrefixes field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetCommonPrefixes() []CommonPrefix {
+ if o == nil || IsNil(o.CommonPrefixes) {
+ var ret []CommonPrefix
+ return ret
+ }
+ return o.CommonPrefixes
+}
+
+// GetCommonPrefixesOk returns a tuple with the CommonPrefixes field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetCommonPrefixesOk() ([]CommonPrefix, bool) {
+ if o == nil || IsNil(o.CommonPrefixes) {
+ return nil, false
+ }
+ return o.CommonPrefixes, true
+}
+
+// HasCommonPrefixes returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasCommonPrefixes() bool {
+ if o != nil && !IsNil(o.CommonPrefixes) {
+ return true
+ }
+
+ return false
+}
+
+// SetCommonPrefixes gets a reference to the given []CommonPrefix and assigns it to the CommonPrefixes field.
+func (o *ListObjectVersionsOutput) SetCommonPrefixes(v []CommonPrefix) {
+ o.CommonPrefixes = v
+}
+
+// GetEncodingType returns the EncodingType field value if set, zero value otherwise.
+func (o *ListObjectVersionsOutput) GetEncodingType() EncodingType {
+ if o == nil || IsNil(o.EncodingType) {
+ var ret EncodingType
+ return ret
+ }
+ return *o.EncodingType
+}
+
+// GetEncodingTypeOk returns a tuple with the EncodingType field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectVersionsOutput) GetEncodingTypeOk() (*EncodingType, bool) {
+ if o == nil || IsNil(o.EncodingType) {
+ return nil, false
+ }
+ return o.EncodingType, true
+}
+
+// HasEncodingType returns a boolean if a field has been set.
+func (o *ListObjectVersionsOutput) HasEncodingType() bool {
+ if o != nil && !IsNil(o.EncodingType) {
+ return true
+ }
+
+ return false
+}
+
+// SetEncodingType gets a reference to the given EncodingType and assigns it to the EncodingType field.
+func (o *ListObjectVersionsOutput) SetEncodingType(v EncodingType) {
+ o.EncodingType = &v
+}
+
+func (o ListObjectVersionsOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ListObjectVersionsOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.IsTruncated) {
+ toSerialize["IsTruncated"] = o.IsTruncated
+ }
+ if !IsNil(o.KeyMarker) {
+ toSerialize["KeyMarker"] = o.KeyMarker
+ }
+ if !IsNil(o.VersionIdMarker) {
+ toSerialize["VersionIdMarker"] = o.VersionIdMarker
+ }
+ if !IsNil(o.NextKeyMarker) {
+ toSerialize["NextKeyMarker"] = o.NextKeyMarker
+ }
+ if !IsNil(o.NextVersionIdMarker) {
+ toSerialize["NextVersionIdMarker"] = o.NextVersionIdMarker
+ }
+ if !IsNil(o.Versions) {
+ toSerialize["Versions"] = o.Versions
+ }
+ if !IsNil(o.DeleteMarkers) {
+ toSerialize["DeleteMarkers"] = o.DeleteMarkers
+ }
+ if !IsNil(o.Name) {
+ toSerialize["Name"] = o.Name
+ }
+ if !IsNil(o.Prefix) {
+ toSerialize["Prefix"] = o.Prefix
+ }
+ if !IsNil(o.Delimiter) {
+ toSerialize["Delimiter"] = o.Delimiter
+ }
+ if !IsNil(o.MaxKeys) {
+ toSerialize["MaxKeys"] = o.MaxKeys
+ }
+ if !IsNil(o.CommonPrefixes) {
+ toSerialize["CommonPrefixes"] = o.CommonPrefixes
+ }
+ if !IsNil(o.EncodingType) {
+ toSerialize["EncodingType"] = o.EncodingType
+ }
+ return toSerialize, nil
+}
+
+type NullableListObjectVersionsOutput struct {
+ value *ListObjectVersionsOutput
+ isSet bool
+}
+
+func (v NullableListObjectVersionsOutput) Get() *ListObjectVersionsOutput {
+ return v.value
+}
+
+func (v *NullableListObjectVersionsOutput) Set(val *ListObjectVersionsOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableListObjectVersionsOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableListObjectVersionsOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableListObjectVersionsOutput(val *ListObjectVersionsOutput) *NullableListObjectVersionsOutput {
+ return &NullableListObjectVersionsOutput{value: val, isSet: true}
+}
+
+func (v NullableListObjectVersionsOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableListObjectVersionsOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_objects_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_objects_output.go
new file mode 100644
index 0000000000..2221e09851
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_objects_output.go
@@ -0,0 +1,461 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ListObjectsOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ListObjectsOutput{}
+
+// ListObjectsOutput struct for ListObjectsOutput
+type ListObjectsOutput struct {
+ XMLName xml.Name `xml:"ListBucketResult"`
+ // A flag that indicates whether IONOS Object Storage returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.
+ IsTruncated *bool `json:"IsTruncated,omitempty" xml:"IsTruncated"`
+ // Indicates where in the bucket listing begins. Marker is included in the response if it was sent with the request.
+ Marker *string `json:"Marker,omitempty" xml:"Marker"`
+ // When response is truncated (the IsTruncated element value in the response is true), you can use the key name in this field as marker in the subsequent request to get next set of objects. IONOS Object Storage lists objects in alphabetical order Note: This element is returned only if you have delimiter request parameter specified. If response does not include the NextMarker and it is truncated, you can use the value of the last Key in the response as the marker in the subsequent request to get the next set of object keys.
+ NextMarker *string `json:"NextMarker,omitempty" xml:"NextMarker"`
+ // Metadata about each object returned.
+ Contents []Object `json:"Contents,omitempty" xml:"Contents"`
+ // The bucket name.
+ Name *string `json:"Name,omitempty" xml:"Name"`
+ // Object key prefix that identifies one or more objects to which this rule applies. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ Prefix *string `json:"Prefix,omitempty" xml:"Prefix"`
+ Delimiter *string `json:"Delimiter,omitempty" xml:"Delimiter"`
+ // The maximum number of keys returned in the response. By default the operation returns up to 1000 key names. The response might contain fewer keys but will never contain more.
+ MaxKeys *int32 `json:"MaxKeys,omitempty" xml:"MaxKeys"`
+ // All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.
+ CommonPrefixes []CommonPrefix `json:"CommonPrefixes,omitempty" xml:"CommonPrefixes"`
+ EncodingType *EncodingType `json:"EncodingType,omitempty" xml:"EncodingType"`
+}
+
+// NewListObjectsOutput instantiates a new ListObjectsOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewListObjectsOutput() *ListObjectsOutput {
+ this := ListObjectsOutput{}
+
+ return &this
+}
+
+// NewListObjectsOutputWithDefaults instantiates a new ListObjectsOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewListObjectsOutputWithDefaults() *ListObjectsOutput {
+ this := ListObjectsOutput{}
+ return &this
+}
+
+// GetIsTruncated returns the IsTruncated field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetIsTruncated() bool {
+ if o == nil || IsNil(o.IsTruncated) {
+ var ret bool
+ return ret
+ }
+ return *o.IsTruncated
+}
+
+// GetIsTruncatedOk returns a tuple with the IsTruncated field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetIsTruncatedOk() (*bool, bool) {
+ if o == nil || IsNil(o.IsTruncated) {
+ return nil, false
+ }
+ return o.IsTruncated, true
+}
+
+// HasIsTruncated returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasIsTruncated() bool {
+ if o != nil && !IsNil(o.IsTruncated) {
+ return true
+ }
+
+ return false
+}
+
+// SetIsTruncated gets a reference to the given bool and assigns it to the IsTruncated field.
+func (o *ListObjectsOutput) SetIsTruncated(v bool) {
+ o.IsTruncated = &v
+}
+
+// GetMarker returns the Marker field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetMarker() string {
+ if o == nil || IsNil(o.Marker) {
+ var ret string
+ return ret
+ }
+ return *o.Marker
+}
+
+// GetMarkerOk returns a tuple with the Marker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.Marker) {
+ return nil, false
+ }
+ return o.Marker, true
+}
+
+// HasMarker returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasMarker() bool {
+ if o != nil && !IsNil(o.Marker) {
+ return true
+ }
+
+ return false
+}
+
+// SetMarker gets a reference to the given string and assigns it to the Marker field.
+func (o *ListObjectsOutput) SetMarker(v string) {
+ o.Marker = &v
+}
+
+// GetNextMarker returns the NextMarker field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetNextMarker() string {
+ if o == nil || IsNil(o.NextMarker) {
+ var ret string
+ return ret
+ }
+ return *o.NextMarker
+}
+
+// GetNextMarkerOk returns a tuple with the NextMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetNextMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.NextMarker) {
+ return nil, false
+ }
+ return o.NextMarker, true
+}
+
+// HasNextMarker returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasNextMarker() bool {
+ if o != nil && !IsNil(o.NextMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetNextMarker gets a reference to the given string and assigns it to the NextMarker field.
+func (o *ListObjectsOutput) SetNextMarker(v string) {
+ o.NextMarker = &v
+}
+
+// GetContents returns the Contents field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetContents() []Object {
+ if o == nil || IsNil(o.Contents) {
+ var ret []Object
+ return ret
+ }
+ return o.Contents
+}
+
+// GetContentsOk returns a tuple with the Contents field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetContentsOk() ([]Object, bool) {
+ if o == nil || IsNil(o.Contents) {
+ return nil, false
+ }
+ return o.Contents, true
+}
+
+// HasContents returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasContents() bool {
+ if o != nil && !IsNil(o.Contents) {
+ return true
+ }
+
+ return false
+}
+
+// SetContents gets a reference to the given []Object and assigns it to the Contents field.
+func (o *ListObjectsOutput) SetContents(v []Object) {
+ o.Contents = v
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *ListObjectsOutput) SetName(v string) {
+ o.Name = &v
+}
+
+// GetPrefix returns the Prefix field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetPrefix() string {
+ if o == nil || IsNil(o.Prefix) {
+ var ret string
+ return ret
+ }
+ return *o.Prefix
+}
+
+// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetPrefixOk() (*string, bool) {
+ if o == nil || IsNil(o.Prefix) {
+ return nil, false
+ }
+ return o.Prefix, true
+}
+
+// HasPrefix returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasPrefix() bool {
+ if o != nil && !IsNil(o.Prefix) {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefix gets a reference to the given string and assigns it to the Prefix field.
+func (o *ListObjectsOutput) SetPrefix(v string) {
+ o.Prefix = &v
+}
+
+// GetDelimiter returns the Delimiter field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetDelimiter() string {
+ if o == nil || IsNil(o.Delimiter) {
+ var ret string
+ return ret
+ }
+ return *o.Delimiter
+}
+
+// GetDelimiterOk returns a tuple with the Delimiter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetDelimiterOk() (*string, bool) {
+ if o == nil || IsNil(o.Delimiter) {
+ return nil, false
+ }
+ return o.Delimiter, true
+}
+
+// HasDelimiter returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasDelimiter() bool {
+ if o != nil && !IsNil(o.Delimiter) {
+ return true
+ }
+
+ return false
+}
+
+// SetDelimiter gets a reference to the given string and assigns it to the Delimiter field.
+func (o *ListObjectsOutput) SetDelimiter(v string) {
+ o.Delimiter = &v
+}
+
+// GetMaxKeys returns the MaxKeys field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetMaxKeys() int32 {
+ if o == nil || IsNil(o.MaxKeys) {
+ var ret int32
+ return ret
+ }
+ return *o.MaxKeys
+}
+
+// GetMaxKeysOk returns a tuple with the MaxKeys field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetMaxKeysOk() (*int32, bool) {
+ if o == nil || IsNil(o.MaxKeys) {
+ return nil, false
+ }
+ return o.MaxKeys, true
+}
+
+// HasMaxKeys returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasMaxKeys() bool {
+ if o != nil && !IsNil(o.MaxKeys) {
+ return true
+ }
+
+ return false
+}
+
+// SetMaxKeys gets a reference to the given int32 and assigns it to the MaxKeys field.
+func (o *ListObjectsOutput) SetMaxKeys(v int32) {
+ o.MaxKeys = &v
+}
+
+// GetCommonPrefixes returns the CommonPrefixes field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetCommonPrefixes() []CommonPrefix {
+ if o == nil || IsNil(o.CommonPrefixes) {
+ var ret []CommonPrefix
+ return ret
+ }
+ return o.CommonPrefixes
+}
+
+// GetCommonPrefixesOk returns a tuple with the CommonPrefixes field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetCommonPrefixesOk() ([]CommonPrefix, bool) {
+ if o == nil || IsNil(o.CommonPrefixes) {
+ return nil, false
+ }
+ return o.CommonPrefixes, true
+}
+
+// HasCommonPrefixes returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasCommonPrefixes() bool {
+ if o != nil && !IsNil(o.CommonPrefixes) {
+ return true
+ }
+
+ return false
+}
+
+// SetCommonPrefixes gets a reference to the given []CommonPrefix and assigns it to the CommonPrefixes field.
+func (o *ListObjectsOutput) SetCommonPrefixes(v []CommonPrefix) {
+ o.CommonPrefixes = v
+}
+
+// GetEncodingType returns the EncodingType field value if set, zero value otherwise.
+func (o *ListObjectsOutput) GetEncodingType() EncodingType {
+ if o == nil || IsNil(o.EncodingType) {
+ var ret EncodingType
+ return ret
+ }
+ return *o.EncodingType
+}
+
+// GetEncodingTypeOk returns a tuple with the EncodingType field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListObjectsOutput) GetEncodingTypeOk() (*EncodingType, bool) {
+ if o == nil || IsNil(o.EncodingType) {
+ return nil, false
+ }
+ return o.EncodingType, true
+}
+
+// HasEncodingType returns a boolean if a field has been set.
+func (o *ListObjectsOutput) HasEncodingType() bool {
+ if o != nil && !IsNil(o.EncodingType) {
+ return true
+ }
+
+ return false
+}
+
+// SetEncodingType gets a reference to the given EncodingType and assigns it to the EncodingType field.
+func (o *ListObjectsOutput) SetEncodingType(v EncodingType) {
+ o.EncodingType = &v
+}
+
+func (o ListObjectsOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ListObjectsOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.IsTruncated) {
+ toSerialize["IsTruncated"] = o.IsTruncated
+ }
+ if !IsNil(o.Marker) {
+ toSerialize["Marker"] = o.Marker
+ }
+ if !IsNil(o.NextMarker) {
+ toSerialize["NextMarker"] = o.NextMarker
+ }
+ if !IsNil(o.Contents) {
+ toSerialize["Contents"] = o.Contents
+ }
+ if !IsNil(o.Name) {
+ toSerialize["Name"] = o.Name
+ }
+ if !IsNil(o.Prefix) {
+ toSerialize["Prefix"] = o.Prefix
+ }
+ if !IsNil(o.Delimiter) {
+ toSerialize["Delimiter"] = o.Delimiter
+ }
+ if !IsNil(o.MaxKeys) {
+ toSerialize["MaxKeys"] = o.MaxKeys
+ }
+ if !IsNil(o.CommonPrefixes) {
+ toSerialize["CommonPrefixes"] = o.CommonPrefixes
+ }
+ if !IsNil(o.EncodingType) {
+ toSerialize["EncodingType"] = o.EncodingType
+ }
+ return toSerialize, nil
+}
+
+type NullableListObjectsOutput struct {
+ value *ListObjectsOutput
+ isSet bool
+}
+
+func (v NullableListObjectsOutput) Get() *ListObjectsOutput {
+ return v.value
+}
+
+func (v *NullableListObjectsOutput) Set(val *ListObjectsOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableListObjectsOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableListObjectsOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableListObjectsOutput(val *ListObjectsOutput) *NullableListObjectsOutput {
+ return &NullableListObjectsOutput{value: val, isSet: true}
+}
+
+func (v NullableListObjectsOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableListObjectsOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_parts_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_parts_output.go
new file mode 100644
index 0000000000..cfce6eed3a
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_list_parts_output.go
@@ -0,0 +1,497 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ListPartsOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ListPartsOutput{}
+
+// ListPartsOutput struct for ListPartsOutput
+type ListPartsOutput struct {
+ XMLName xml.Name `xml:"ListPartsOutput"`
+ // The bucket name.
+ Bucket *string `json:"Bucket,omitempty" xml:"Name"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // ID of the multipart upload.
+ UploadId *string `json:"UploadId,omitempty" xml:"UploadId"`
+ // When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
+ PartNumberMarker *int32 `json:"PartNumberMarker,omitempty" xml:"PartNumberMarker"`
+ // When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.
+ NextPartNumberMarker *string `json:"NextPartNumberMarker,omitempty" xml:"NextPartNumberMarker"`
+ // Maximum number of parts that were allowed in the response.
+ MaxParts *string `json:"MaxParts,omitempty" xml:"MaxParts"`
+ // A flag that indicates whether IONOS Object Storage returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.
+ IsTruncated *bool `json:"IsTruncated,omitempty" xml:"IsTruncated"`
+ // Container for elements related to a particular part. A response can contain zero or more `Part` elements.
+ Parts []Part `json:"Parts,omitempty" xml:"Parts"`
+ Initiator *Initiator `json:"Initiator,omitempty" xml:"Initiator"`
+ Owner *Owner `json:"Owner,omitempty" xml:"Owner"`
+ StorageClass *StorageClass `json:"StorageClass,omitempty" xml:"StorageClass"`
+}
+
+// NewListPartsOutput instantiates a new ListPartsOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewListPartsOutput() *ListPartsOutput {
+ this := ListPartsOutput{}
+
+ return &this
+}
+
+// NewListPartsOutputWithDefaults instantiates a new ListPartsOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewListPartsOutputWithDefaults() *ListPartsOutput {
+ this := ListPartsOutput{}
+ return &this
+}
+
+// GetBucket returns the Bucket field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetBucket() string {
+ if o == nil || IsNil(o.Bucket) {
+ var ret string
+ return ret
+ }
+ return *o.Bucket
+}
+
+// GetBucketOk returns a tuple with the Bucket field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetBucketOk() (*string, bool) {
+ if o == nil || IsNil(o.Bucket) {
+ return nil, false
+ }
+ return o.Bucket, true
+}
+
+// HasBucket returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasBucket() bool {
+ if o != nil && !IsNil(o.Bucket) {
+ return true
+ }
+
+ return false
+}
+
+// SetBucket gets a reference to the given string and assigns it to the Bucket field.
+func (o *ListPartsOutput) SetBucket(v string) {
+ o.Bucket = &v
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *ListPartsOutput) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetUploadId returns the UploadId field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetUploadId() string {
+ if o == nil || IsNil(o.UploadId) {
+ var ret string
+ return ret
+ }
+ return *o.UploadId
+}
+
+// GetUploadIdOk returns a tuple with the UploadId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetUploadIdOk() (*string, bool) {
+ if o == nil || IsNil(o.UploadId) {
+ return nil, false
+ }
+ return o.UploadId, true
+}
+
+// HasUploadId returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasUploadId() bool {
+ if o != nil && !IsNil(o.UploadId) {
+ return true
+ }
+
+ return false
+}
+
+// SetUploadId gets a reference to the given string and assigns it to the UploadId field.
+func (o *ListPartsOutput) SetUploadId(v string) {
+ o.UploadId = &v
+}
+
+// GetPartNumberMarker returns the PartNumberMarker field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetPartNumberMarker() int32 {
+ if o == nil || IsNil(o.PartNumberMarker) {
+ var ret int32
+ return ret
+ }
+ return *o.PartNumberMarker
+}
+
+// GetPartNumberMarkerOk returns a tuple with the PartNumberMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetPartNumberMarkerOk() (*int32, bool) {
+ if o == nil || IsNil(o.PartNumberMarker) {
+ return nil, false
+ }
+ return o.PartNumberMarker, true
+}
+
+// HasPartNumberMarker returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasPartNumberMarker() bool {
+ if o != nil && !IsNil(o.PartNumberMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetPartNumberMarker gets a reference to the given int32 and assigns it to the PartNumberMarker field.
+func (o *ListPartsOutput) SetPartNumberMarker(v int32) {
+ o.PartNumberMarker = &v
+}
+
+// GetNextPartNumberMarker returns the NextPartNumberMarker field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetNextPartNumberMarker() string {
+ if o == nil || IsNil(o.NextPartNumberMarker) {
+ var ret string
+ return ret
+ }
+ return *o.NextPartNumberMarker
+}
+
+// GetNextPartNumberMarkerOk returns a tuple with the NextPartNumberMarker field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetNextPartNumberMarkerOk() (*string, bool) {
+ if o == nil || IsNil(o.NextPartNumberMarker) {
+ return nil, false
+ }
+ return o.NextPartNumberMarker, true
+}
+
+// HasNextPartNumberMarker returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasNextPartNumberMarker() bool {
+ if o != nil && !IsNil(o.NextPartNumberMarker) {
+ return true
+ }
+
+ return false
+}
+
+// SetNextPartNumberMarker gets a reference to the given string and assigns it to the NextPartNumberMarker field.
+func (o *ListPartsOutput) SetNextPartNumberMarker(v string) {
+ o.NextPartNumberMarker = &v
+}
+
+// GetMaxParts returns the MaxParts field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetMaxParts() string {
+ if o == nil || IsNil(o.MaxParts) {
+ var ret string
+ return ret
+ }
+ return *o.MaxParts
+}
+
+// GetMaxPartsOk returns a tuple with the MaxParts field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetMaxPartsOk() (*string, bool) {
+ if o == nil || IsNil(o.MaxParts) {
+ return nil, false
+ }
+ return o.MaxParts, true
+}
+
+// HasMaxParts returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasMaxParts() bool {
+ if o != nil && !IsNil(o.MaxParts) {
+ return true
+ }
+
+ return false
+}
+
+// SetMaxParts gets a reference to the given string and assigns it to the MaxParts field.
+func (o *ListPartsOutput) SetMaxParts(v string) {
+ o.MaxParts = &v
+}
+
+// GetIsTruncated returns the IsTruncated field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetIsTruncated() bool {
+ if o == nil || IsNil(o.IsTruncated) {
+ var ret bool
+ return ret
+ }
+ return *o.IsTruncated
+}
+
+// GetIsTruncatedOk returns a tuple with the IsTruncated field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetIsTruncatedOk() (*bool, bool) {
+ if o == nil || IsNil(o.IsTruncated) {
+ return nil, false
+ }
+ return o.IsTruncated, true
+}
+
+// HasIsTruncated returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasIsTruncated() bool {
+ if o != nil && !IsNil(o.IsTruncated) {
+ return true
+ }
+
+ return false
+}
+
+// SetIsTruncated gets a reference to the given bool and assigns it to the IsTruncated field.
+func (o *ListPartsOutput) SetIsTruncated(v bool) {
+ o.IsTruncated = &v
+}
+
+// GetParts returns the Parts field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetParts() []Part {
+ if o == nil || IsNil(o.Parts) {
+ var ret []Part
+ return ret
+ }
+ return o.Parts
+}
+
+// GetPartsOk returns a tuple with the Parts field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetPartsOk() ([]Part, bool) {
+ if o == nil || IsNil(o.Parts) {
+ return nil, false
+ }
+ return o.Parts, true
+}
+
+// HasParts returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasParts() bool {
+ if o != nil && !IsNil(o.Parts) {
+ return true
+ }
+
+ return false
+}
+
+// SetParts gets a reference to the given []Part and assigns it to the Parts field.
+func (o *ListPartsOutput) SetParts(v []Part) {
+ o.Parts = v
+}
+
+// GetInitiator returns the Initiator field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetInitiator() Initiator {
+ if o == nil || IsNil(o.Initiator) {
+ var ret Initiator
+ return ret
+ }
+ return *o.Initiator
+}
+
+// GetInitiatorOk returns a tuple with the Initiator field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetInitiatorOk() (*Initiator, bool) {
+ if o == nil || IsNil(o.Initiator) {
+ return nil, false
+ }
+ return o.Initiator, true
+}
+
+// HasInitiator returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasInitiator() bool {
+ if o != nil && !IsNil(o.Initiator) {
+ return true
+ }
+
+ return false
+}
+
+// SetInitiator gets a reference to the given Initiator and assigns it to the Initiator field.
+func (o *ListPartsOutput) SetInitiator(v Initiator) {
+ o.Initiator = &v
+}
+
+// GetOwner returns the Owner field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetOwner() Owner {
+ if o == nil || IsNil(o.Owner) {
+ var ret Owner
+ return ret
+ }
+ return *o.Owner
+}
+
+// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetOwnerOk() (*Owner, bool) {
+ if o == nil || IsNil(o.Owner) {
+ return nil, false
+ }
+ return o.Owner, true
+}
+
+// HasOwner returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasOwner() bool {
+ if o != nil && !IsNil(o.Owner) {
+ return true
+ }
+
+ return false
+}
+
+// SetOwner gets a reference to the given Owner and assigns it to the Owner field.
+func (o *ListPartsOutput) SetOwner(v Owner) {
+ o.Owner = &v
+}
+
+// GetStorageClass returns the StorageClass field value if set, zero value otherwise.
+func (o *ListPartsOutput) GetStorageClass() StorageClass {
+ if o == nil || IsNil(o.StorageClass) {
+ var ret StorageClass
+ return ret
+ }
+ return *o.StorageClass
+}
+
+// GetStorageClassOk returns a tuple with the StorageClass field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ListPartsOutput) GetStorageClassOk() (*StorageClass, bool) {
+ if o == nil || IsNil(o.StorageClass) {
+ return nil, false
+ }
+ return o.StorageClass, true
+}
+
+// HasStorageClass returns a boolean if a field has been set.
+func (o *ListPartsOutput) HasStorageClass() bool {
+ if o != nil && !IsNil(o.StorageClass) {
+ return true
+ }
+
+ return false
+}
+
+// SetStorageClass gets a reference to the given StorageClass and assigns it to the StorageClass field.
+func (o *ListPartsOutput) SetStorageClass(v StorageClass) {
+ o.StorageClass = &v
+}
+
+func (o ListPartsOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ListPartsOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Bucket) {
+ toSerialize["Bucket"] = o.Bucket
+ }
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.UploadId) {
+ toSerialize["UploadId"] = o.UploadId
+ }
+ if !IsNil(o.PartNumberMarker) {
+ toSerialize["PartNumberMarker"] = o.PartNumberMarker
+ }
+ if !IsNil(o.NextPartNumberMarker) {
+ toSerialize["NextPartNumberMarker"] = o.NextPartNumberMarker
+ }
+ if !IsNil(o.MaxParts) {
+ toSerialize["MaxParts"] = o.MaxParts
+ }
+ if !IsNil(o.IsTruncated) {
+ toSerialize["IsTruncated"] = o.IsTruncated
+ }
+ if !IsNil(o.Parts) {
+ toSerialize["Parts"] = o.Parts
+ }
+ if !IsNil(o.Initiator) {
+ toSerialize["Initiator"] = o.Initiator
+ }
+ if !IsNil(o.Owner) {
+ toSerialize["Owner"] = o.Owner
+ }
+ if !IsNil(o.StorageClass) {
+ toSerialize["StorageClass"] = o.StorageClass
+ }
+ return toSerialize, nil
+}
+
+type NullableListPartsOutput struct {
+ value *ListPartsOutput
+ isSet bool
+}
+
+func (v NullableListPartsOutput) Get() *ListPartsOutput {
+ return v.value
+}
+
+func (v *NullableListPartsOutput) Set(val *ListPartsOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableListPartsOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableListPartsOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableListPartsOutput(val *ListPartsOutput) *NullableListPartsOutput {
+ return &NullableListPartsOutput{value: val, isSet: true}
+}
+
+func (v NullableListPartsOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableListPartsOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_metadata_entry.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_metadata_entry.go
new file mode 100644
index 0000000000..a263218ae7
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_metadata_entry.go
@@ -0,0 +1,167 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the MetadataEntry type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &MetadataEntry{}
+
+// MetadataEntry A metadata key-value pair to store with an object.
+type MetadataEntry struct {
+ XMLName xml.Name `xml:"MetadataEntry"`
+ // Name of the Object.
+ Name *string `json:"Name,omitempty" xml:"Name"`
+ // Value of the Object.
+ Value *string `json:"Value,omitempty" xml:"Value"`
+}
+
+// NewMetadataEntry instantiates a new MetadataEntry object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMetadataEntry() *MetadataEntry {
+ this := MetadataEntry{}
+
+ return &this
+}
+
+// NewMetadataEntryWithDefaults instantiates a new MetadataEntry object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMetadataEntryWithDefaults() *MetadataEntry {
+ this := MetadataEntry{}
+ return &this
+}
+
+// GetName returns the Name field value if set, zero value otherwise.
+func (o *MetadataEntry) GetName() string {
+ if o == nil || IsNil(o.Name) {
+ var ret string
+ return ret
+ }
+ return *o.Name
+}
+
+// GetNameOk returns a tuple with the Name field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataEntry) GetNameOk() (*string, bool) {
+ if o == nil || IsNil(o.Name) {
+ return nil, false
+ }
+ return o.Name, true
+}
+
+// HasName returns a boolean if a field has been set.
+func (o *MetadataEntry) HasName() bool {
+ if o != nil && !IsNil(o.Name) {
+ return true
+ }
+
+ return false
+}
+
+// SetName gets a reference to the given string and assigns it to the Name field.
+func (o *MetadataEntry) SetName(v string) {
+ o.Name = &v
+}
+
+// GetValue returns the Value field value if set, zero value otherwise.
+func (o *MetadataEntry) GetValue() string {
+ if o == nil || IsNil(o.Value) {
+ var ret string
+ return ret
+ }
+ return *o.Value
+}
+
+// GetValueOk returns a tuple with the Value field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MetadataEntry) GetValueOk() (*string, bool) {
+ if o == nil || IsNil(o.Value) {
+ return nil, false
+ }
+ return o.Value, true
+}
+
+// HasValue returns a boolean if a field has been set.
+func (o *MetadataEntry) HasValue() bool {
+ if o != nil && !IsNil(o.Value) {
+ return true
+ }
+
+ return false
+}
+
+// SetValue gets a reference to the given string and assigns it to the Value field.
+func (o *MetadataEntry) SetValue(v string) {
+ o.Value = &v
+}
+
+func (o MetadataEntry) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o MetadataEntry) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Name) {
+ toSerialize["Name"] = o.Name
+ }
+ if !IsNil(o.Value) {
+ toSerialize["Value"] = o.Value
+ }
+ return toSerialize, nil
+}
+
+type NullableMetadataEntry struct {
+ value *MetadataEntry
+ isSet bool
+}
+
+func (v NullableMetadataEntry) Get() *MetadataEntry {
+ return v.value
+}
+
+func (v *NullableMetadataEntry) Set(val *MetadataEntry) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMetadataEntry) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMetadataEntry) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMetadataEntry(val *MetadataEntry) *NullableMetadataEntry {
+ return &NullableMetadataEntry{value: val, isSet: true}
+}
+
+func (v NullableMetadataEntry) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMetadataEntry) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_mfa_delete_status.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_mfa_delete_status.go
new file mode 100644
index 0000000000..58def0902a
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_mfa_delete_status.go
@@ -0,0 +1,83 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// MfaDeleteStatus Specifies status of the Multi-factor Authentication delete (MFA Delete) for the bucket versioning configuration. Currently, this feature is not supported for the `PutBucketVersioning` API call.
+type MfaDeleteStatus string
+
+// List of MfaDeleteStatus
+const (
+ MFADELETESTATUS_DISABLED MfaDeleteStatus = "Disabled"
+)
+
+func (v *MfaDeleteStatus) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := MfaDeleteStatus(value)
+ for _, existing := range []MfaDeleteStatus{"Disabled"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid MfaDeleteStatus", value)
+}
+
+// Ptr returns reference to MfaDeleteStatus value
+func (v MfaDeleteStatus) Ptr() *MfaDeleteStatus {
+ return &v
+}
+
+type NullableMfaDeleteStatus struct {
+ value *MfaDeleteStatus
+ isSet bool
+}
+
+func (v NullableMfaDeleteStatus) Get() *MfaDeleteStatus {
+ return v.value
+}
+
+func (v *NullableMfaDeleteStatus) Set(val *MfaDeleteStatus) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMfaDeleteStatus) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMfaDeleteStatus) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMfaDeleteStatus(val *MfaDeleteStatus) *NullableMfaDeleteStatus {
+ return &NullableMfaDeleteStatus{value: val, isSet: true}
+}
+
+func (v NullableMfaDeleteStatus) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMfaDeleteStatus) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_multipart_upload.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_multipart_upload.go
new file mode 100644
index 0000000000..002f009fd7
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_multipart_upload.go
@@ -0,0 +1,313 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the MultipartUpload type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &MultipartUpload{}
+
+// MultipartUpload Container for the `MultipartUpload` for the IONOS Object Storage object.
+type MultipartUpload struct {
+ XMLName xml.Name `xml:"MultipartUpload"`
+ // ID of the multipart upload.
+ UploadId *string `json:"UploadId,omitempty" xml:"UploadId"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // Date and time at which the multipart upload was initiated.
+ Initiated *IonosTime `json:"Initiated,omitempty" xml:"Initiated"`
+ StorageClass *StorageClass `json:"StorageClass,omitempty" xml:"StorageClass"`
+ Owner *Owner `json:"Owner,omitempty" xml:"Owner"`
+ Initiator *Initiator `json:"Initiator,omitempty" xml:"Initiator"`
+}
+
+// NewMultipartUpload instantiates a new MultipartUpload object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewMultipartUpload() *MultipartUpload {
+ this := MultipartUpload{}
+
+ return &this
+}
+
+// NewMultipartUploadWithDefaults instantiates a new MultipartUpload object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewMultipartUploadWithDefaults() *MultipartUpload {
+ this := MultipartUpload{}
+ return &this
+}
+
+// GetUploadId returns the UploadId field value if set, zero value otherwise.
+func (o *MultipartUpload) GetUploadId() string {
+ if o == nil || IsNil(o.UploadId) {
+ var ret string
+ return ret
+ }
+ return *o.UploadId
+}
+
+// GetUploadIdOk returns a tuple with the UploadId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MultipartUpload) GetUploadIdOk() (*string, bool) {
+ if o == nil || IsNil(o.UploadId) {
+ return nil, false
+ }
+ return o.UploadId, true
+}
+
+// HasUploadId returns a boolean if a field has been set.
+func (o *MultipartUpload) HasUploadId() bool {
+ if o != nil && !IsNil(o.UploadId) {
+ return true
+ }
+
+ return false
+}
+
+// SetUploadId gets a reference to the given string and assigns it to the UploadId field.
+func (o *MultipartUpload) SetUploadId(v string) {
+ o.UploadId = &v
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *MultipartUpload) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MultipartUpload) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *MultipartUpload) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *MultipartUpload) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetInitiated returns the Initiated field value if set, zero value otherwise.
+func (o *MultipartUpload) GetInitiated() time.Time {
+ if o == nil || IsNil(o.Initiated) {
+ var ret time.Time
+ return ret
+ }
+ return o.Initiated.Time
+}
+
+// GetInitiatedOk returns a tuple with the Initiated field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MultipartUpload) GetInitiatedOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.Initiated) {
+ return nil, false
+ }
+ return &o.Initiated.Time, true
+}
+
+// HasInitiated returns a boolean if a field has been set.
+func (o *MultipartUpload) HasInitiated() bool {
+ if o != nil && !IsNil(o.Initiated) {
+ return true
+ }
+
+ return false
+}
+
+// SetInitiated gets a reference to the given time.Time and assigns it to the Initiated field.
+func (o *MultipartUpload) SetInitiated(v time.Time) {
+ o.Initiated = &IonosTime{v}
+}
+
+// GetStorageClass returns the StorageClass field value if set, zero value otherwise.
+func (o *MultipartUpload) GetStorageClass() StorageClass {
+ if o == nil || IsNil(o.StorageClass) {
+ var ret StorageClass
+ return ret
+ }
+ return *o.StorageClass
+}
+
+// GetStorageClassOk returns a tuple with the StorageClass field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MultipartUpload) GetStorageClassOk() (*StorageClass, bool) {
+ if o == nil || IsNil(o.StorageClass) {
+ return nil, false
+ }
+ return o.StorageClass, true
+}
+
+// HasStorageClass returns a boolean if a field has been set.
+func (o *MultipartUpload) HasStorageClass() bool {
+ if o != nil && !IsNil(o.StorageClass) {
+ return true
+ }
+
+ return false
+}
+
+// SetStorageClass gets a reference to the given StorageClass and assigns it to the StorageClass field.
+func (o *MultipartUpload) SetStorageClass(v StorageClass) {
+ o.StorageClass = &v
+}
+
+// GetOwner returns the Owner field value if set, zero value otherwise.
+func (o *MultipartUpload) GetOwner() Owner {
+ if o == nil || IsNil(o.Owner) {
+ var ret Owner
+ return ret
+ }
+ return *o.Owner
+}
+
+// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MultipartUpload) GetOwnerOk() (*Owner, bool) {
+ if o == nil || IsNil(o.Owner) {
+ return nil, false
+ }
+ return o.Owner, true
+}
+
+// HasOwner returns a boolean if a field has been set.
+func (o *MultipartUpload) HasOwner() bool {
+ if o != nil && !IsNil(o.Owner) {
+ return true
+ }
+
+ return false
+}
+
+// SetOwner gets a reference to the given Owner and assigns it to the Owner field.
+func (o *MultipartUpload) SetOwner(v Owner) {
+ o.Owner = &v
+}
+
+// GetInitiator returns the Initiator field value if set, zero value otherwise.
+func (o *MultipartUpload) GetInitiator() Initiator {
+ if o == nil || IsNil(o.Initiator) {
+ var ret Initiator
+ return ret
+ }
+ return *o.Initiator
+}
+
+// GetInitiatorOk returns a tuple with the Initiator field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *MultipartUpload) GetInitiatorOk() (*Initiator, bool) {
+ if o == nil || IsNil(o.Initiator) {
+ return nil, false
+ }
+ return o.Initiator, true
+}
+
+// HasInitiator returns a boolean if a field has been set.
+func (o *MultipartUpload) HasInitiator() bool {
+ if o != nil && !IsNil(o.Initiator) {
+ return true
+ }
+
+ return false
+}
+
+// SetInitiator gets a reference to the given Initiator and assigns it to the Initiator field.
+func (o *MultipartUpload) SetInitiator(v Initiator) {
+ o.Initiator = &v
+}
+
+func (o MultipartUpload) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o MultipartUpload) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.UploadId) {
+ toSerialize["UploadId"] = o.UploadId
+ }
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.Initiated) {
+ toSerialize["Initiated"] = o.Initiated
+ }
+ if !IsNil(o.StorageClass) {
+ toSerialize["StorageClass"] = o.StorageClass
+ }
+ if !IsNil(o.Owner) {
+ toSerialize["Owner"] = o.Owner
+ }
+ if !IsNil(o.Initiator) {
+ toSerialize["Initiator"] = o.Initiator
+ }
+ return toSerialize, nil
+}
+
+type NullableMultipartUpload struct {
+ value *MultipartUpload
+ isSet bool
+}
+
+func (v NullableMultipartUpload) Get() *MultipartUpload {
+ return v.value
+}
+
+func (v *NullableMultipartUpload) Set(val *MultipartUpload) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableMultipartUpload) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableMultipartUpload) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableMultipartUpload(val *MultipartUpload) *NullableMultipartUpload {
+ return &NullableMultipartUpload{value: val, isSet: true}
+}
+
+func (v NullableMultipartUpload) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableMultipartUpload) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_noncurrent_version_expiration.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_noncurrent_version_expiration.go
new file mode 100644
index 0000000000..ebf006692f
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_noncurrent_version_expiration.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the NoncurrentVersionExpiration type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &NoncurrentVersionExpiration{}
+
+// NoncurrentVersionExpiration Specifies when noncurrent object versions expire. Upon expiration, IONOS Object Storage permanently deletes the noncurrent object versions. You set this lifecycle configuration operation on a bucket that has versioning enabled (or suspended) to request that IONOS Object Storage delete noncurrent object versions at a specific period in the object's lifetime.
+type NoncurrentVersionExpiration struct {
+ XMLName xml.Name `xml:"NoncurrentVersionExpiration"`
+ // Specifies the number of days an object is noncurrent before IONOS Object Storage can perform the associated operation.
+ NoncurrentDays *int32 `json:"NoncurrentDays,omitempty" xml:"NoncurrentDays"`
+}
+
+// NewNoncurrentVersionExpiration instantiates a new NoncurrentVersionExpiration object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewNoncurrentVersionExpiration() *NoncurrentVersionExpiration {
+ this := NoncurrentVersionExpiration{}
+
+ return &this
+}
+
+// NewNoncurrentVersionExpirationWithDefaults instantiates a new NoncurrentVersionExpiration object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewNoncurrentVersionExpirationWithDefaults() *NoncurrentVersionExpiration {
+ this := NoncurrentVersionExpiration{}
+ return &this
+}
+
+// GetNoncurrentDays returns the NoncurrentDays field value if set, zero value otherwise.
+func (o *NoncurrentVersionExpiration) GetNoncurrentDays() int32 {
+ if o == nil || IsNil(o.NoncurrentDays) {
+ var ret int32
+ return ret
+ }
+ return *o.NoncurrentDays
+}
+
+// GetNoncurrentDaysOk returns a tuple with the NoncurrentDays field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *NoncurrentVersionExpiration) GetNoncurrentDaysOk() (*int32, bool) {
+ if o == nil || IsNil(o.NoncurrentDays) {
+ return nil, false
+ }
+ return o.NoncurrentDays, true
+}
+
+// HasNoncurrentDays returns a boolean if a field has been set.
+func (o *NoncurrentVersionExpiration) HasNoncurrentDays() bool {
+ if o != nil && !IsNil(o.NoncurrentDays) {
+ return true
+ }
+
+ return false
+}
+
+// SetNoncurrentDays gets a reference to the given int32 and assigns it to the NoncurrentDays field.
+func (o *NoncurrentVersionExpiration) SetNoncurrentDays(v int32) {
+ o.NoncurrentDays = &v
+}
+
+func (o NoncurrentVersionExpiration) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o NoncurrentVersionExpiration) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.NoncurrentDays) {
+ toSerialize["NoncurrentDays"] = o.NoncurrentDays
+ }
+ return toSerialize, nil
+}
+
+type NullableNoncurrentVersionExpiration struct {
+ value *NoncurrentVersionExpiration
+ isSet bool
+}
+
+func (v NullableNoncurrentVersionExpiration) Get() *NoncurrentVersionExpiration {
+ return v.value
+}
+
+func (v *NullableNoncurrentVersionExpiration) Set(val *NoncurrentVersionExpiration) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableNoncurrentVersionExpiration) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableNoncurrentVersionExpiration) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableNoncurrentVersionExpiration(val *NoncurrentVersionExpiration) *NullableNoncurrentVersionExpiration {
+ return &NullableNoncurrentVersionExpiration{value: val, isSet: true}
+}
+
+func (v NullableNoncurrentVersionExpiration) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableNoncurrentVersionExpiration) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object.go
new file mode 100644
index 0000000000..14611ab451
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object.go
@@ -0,0 +1,314 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the Object type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Object{}
+
+// Object An object consists of data and its descriptive metadata.
+type Object struct {
+ XMLName xml.Name `xml:"Contents"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // Creation date of the object.
+ LastModified *IonosTime `json:"LastModified,omitempty" xml:"LastModified"`
+ StorageClass *ObjectStorageClass `json:"StorageClass,omitempty" xml:"StorageClass"`
+ // Size in bytes of the object
+ Size *int32 `json:"Size,omitempty" xml:"Size"`
+ // Entity tag that identifies the object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.
+ ETag *string `json:"ETag,omitempty" xml:"ETag"`
+ Owner *Owner `json:"Owner,omitempty" xml:"Owner"`
+}
+
+// NewObject instantiates a new Object object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewObject() *Object {
+ this := Object{}
+
+ return &this
+}
+
+// NewObjectWithDefaults instantiates a new Object object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewObjectWithDefaults() *Object {
+ this := Object{}
+ return &this
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *Object) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Object) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *Object) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *Object) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetLastModified returns the LastModified field value if set, zero value otherwise.
+func (o *Object) GetLastModified() time.Time {
+ if o == nil || IsNil(o.LastModified) {
+ var ret time.Time
+ return ret
+ }
+ return o.LastModified.Time
+}
+
+// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Object) GetLastModifiedOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.LastModified) {
+ return nil, false
+ }
+ return &o.LastModified.Time, true
+}
+
+// HasLastModified returns a boolean if a field has been set.
+func (o *Object) HasLastModified() bool {
+ if o != nil && !IsNil(o.LastModified) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastModified gets a reference to the given time.Time and assigns it to the LastModified field.
+func (o *Object) SetLastModified(v time.Time) {
+ o.LastModified = &IonosTime{v}
+}
+
+// GetStorageClass returns the StorageClass field value if set, zero value otherwise.
+func (o *Object) GetStorageClass() ObjectStorageClass {
+ if o == nil || IsNil(o.StorageClass) {
+ var ret ObjectStorageClass
+ return ret
+ }
+ return *o.StorageClass
+}
+
+// GetStorageClassOk returns a tuple with the StorageClass field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Object) GetStorageClassOk() (*ObjectStorageClass, bool) {
+ if o == nil || IsNil(o.StorageClass) {
+ return nil, false
+ }
+ return o.StorageClass, true
+}
+
+// HasStorageClass returns a boolean if a field has been set.
+func (o *Object) HasStorageClass() bool {
+ if o != nil && !IsNil(o.StorageClass) {
+ return true
+ }
+
+ return false
+}
+
+// SetStorageClass gets a reference to the given ObjectStorageClass and assigns it to the StorageClass field.
+func (o *Object) SetStorageClass(v ObjectStorageClass) {
+ o.StorageClass = &v
+}
+
+// GetSize returns the Size field value if set, zero value otherwise.
+func (o *Object) GetSize() int32 {
+ if o == nil || IsNil(o.Size) {
+ var ret int32
+ return ret
+ }
+ return *o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Object) GetSizeOk() (*int32, bool) {
+ if o == nil || IsNil(o.Size) {
+ return nil, false
+ }
+ return o.Size, true
+}
+
+// HasSize returns a boolean if a field has been set.
+func (o *Object) HasSize() bool {
+ if o != nil && !IsNil(o.Size) {
+ return true
+ }
+
+ return false
+}
+
+// SetSize gets a reference to the given int32 and assigns it to the Size field.
+func (o *Object) SetSize(v int32) {
+ o.Size = &v
+}
+
+// GetETag returns the ETag field value if set, zero value otherwise.
+func (o *Object) GetETag() string {
+ if o == nil || IsNil(o.ETag) {
+ var ret string
+ return ret
+ }
+ return *o.ETag
+}
+
+// GetETagOk returns a tuple with the ETag field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Object) GetETagOk() (*string, bool) {
+ if o == nil || IsNil(o.ETag) {
+ return nil, false
+ }
+ return o.ETag, true
+}
+
+// HasETag returns a boolean if a field has been set.
+func (o *Object) HasETag() bool {
+ if o != nil && !IsNil(o.ETag) {
+ return true
+ }
+
+ return false
+}
+
+// SetETag gets a reference to the given string and assigns it to the ETag field.
+func (o *Object) SetETag(v string) {
+ o.ETag = &v
+}
+
+// GetOwner returns the Owner field value if set, zero value otherwise.
+func (o *Object) GetOwner() Owner {
+ if o == nil || IsNil(o.Owner) {
+ var ret Owner
+ return ret
+ }
+ return *o.Owner
+}
+
+// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Object) GetOwnerOk() (*Owner, bool) {
+ if o == nil || IsNil(o.Owner) {
+ return nil, false
+ }
+ return o.Owner, true
+}
+
+// HasOwner returns a boolean if a field has been set.
+func (o *Object) HasOwner() bool {
+ if o != nil && !IsNil(o.Owner) {
+ return true
+ }
+
+ return false
+}
+
+// SetOwner gets a reference to the given Owner and assigns it to the Owner field.
+func (o *Object) SetOwner(v Owner) {
+ o.Owner = &v
+}
+
+func (o Object) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Object) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.LastModified) {
+ toSerialize["LastModified"] = o.LastModified
+ }
+ if !IsNil(o.StorageClass) {
+ toSerialize["StorageClass"] = o.StorageClass
+ }
+ if !IsNil(o.Size) {
+ toSerialize["Size"] = o.Size
+ }
+ if !IsNil(o.ETag) {
+ toSerialize["ETag"] = o.ETag
+ }
+ if !IsNil(o.Owner) {
+ toSerialize["Owner"] = o.Owner
+ }
+ return toSerialize, nil
+}
+
+type NullableObject struct {
+ value *Object
+ isSet bool
+}
+
+func (v NullableObject) Get() *Object {
+ return v.value
+}
+
+func (v *NullableObject) Set(val *Object) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableObject) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableObject) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableObject(val *Object) *NullableObject {
+ return &NullableObject{value: val, isSet: true}
+}
+
+func (v NullableObject) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableObject) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_identifier.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_identifier.go
new file mode 100644
index 0000000000..825149ad89
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_identifier.go
@@ -0,0 +1,159 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ObjectIdentifier type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ObjectIdentifier{}
+
+// ObjectIdentifier Object Identifier is unique value to identify objects.
+type ObjectIdentifier struct {
+ XMLName xml.Name `xml:"Object"`
+ // The object key.
+ Key string `json:"Key" xml:"Key"`
+ // VersionId for the specific version of the object to delete.
+ VersionId *string `json:"VersionId,omitempty" xml:"VersionId"`
+}
+
+// NewObjectIdentifier instantiates a new ObjectIdentifier object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewObjectIdentifier(key string) *ObjectIdentifier {
+ this := ObjectIdentifier{}
+
+ this.Key = key
+
+ return &this
+}
+
+// NewObjectIdentifierWithDefaults instantiates a new ObjectIdentifier object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewObjectIdentifierWithDefaults() *ObjectIdentifier {
+ this := ObjectIdentifier{}
+ return &this
+}
+
+// GetKey returns the Key field value
+func (o *ObjectIdentifier) GetKey() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value
+// and a boolean to check if the value has been set.
+func (o *ObjectIdentifier) GetKeyOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Key, true
+}
+
+// SetKey sets field value
+func (o *ObjectIdentifier) SetKey(v string) {
+ o.Key = v
+}
+
+// GetVersionId returns the VersionId field value if set, zero value otherwise.
+func (o *ObjectIdentifier) GetVersionId() string {
+ if o == nil || IsNil(o.VersionId) {
+ var ret string
+ return ret
+ }
+ return *o.VersionId
+}
+
+// GetVersionIdOk returns a tuple with the VersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectIdentifier) GetVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.VersionId) {
+ return nil, false
+ }
+ return o.VersionId, true
+}
+
+// HasVersionId returns a boolean if a field has been set.
+func (o *ObjectIdentifier) HasVersionId() bool {
+ if o != nil && !IsNil(o.VersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersionId gets a reference to the given string and assigns it to the VersionId field.
+func (o *ObjectIdentifier) SetVersionId(v string) {
+ o.VersionId = &v
+}
+
+func (o ObjectIdentifier) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ObjectIdentifier) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Key"] = o.Key
+ if !IsNil(o.VersionId) {
+ toSerialize["VersionId"] = o.VersionId
+ }
+ return toSerialize, nil
+}
+
+type NullableObjectIdentifier struct {
+ value *ObjectIdentifier
+ isSet bool
+}
+
+func (v NullableObjectIdentifier) Get() *ObjectIdentifier {
+ return v.value
+}
+
+func (v *NullableObjectIdentifier) Set(val *ObjectIdentifier) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableObjectIdentifier) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableObjectIdentifier) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableObjectIdentifier(val *ObjectIdentifier) *NullableObjectIdentifier {
+ return &NullableObjectIdentifier{value: val, isSet: true}
+}
+
+func (v NullableObjectIdentifier) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableObjectIdentifier) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_legal_hold_configuration.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_legal_hold_configuration.go
new file mode 100644
index 0000000000..c86c21b812
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_legal_hold_configuration.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ObjectLegalHoldConfiguration type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ObjectLegalHoldConfiguration{}
+
+// ObjectLegalHoldConfiguration A Legal Hold configuration for an object.
+type ObjectLegalHoldConfiguration struct {
+ XMLName xml.Name `xml:"LegalHold"`
+ // Object Legal Hold status
+ Status *string `json:"Status,omitempty" xml:"Status"`
+}
+
+// NewObjectLegalHoldConfiguration instantiates a new ObjectLegalHoldConfiguration object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewObjectLegalHoldConfiguration() *ObjectLegalHoldConfiguration {
+ this := ObjectLegalHoldConfiguration{}
+
+ return &this
+}
+
+// NewObjectLegalHoldConfigurationWithDefaults instantiates a new ObjectLegalHoldConfiguration object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewObjectLegalHoldConfigurationWithDefaults() *ObjectLegalHoldConfiguration {
+ this := ObjectLegalHoldConfiguration{}
+ return &this
+}
+
+// GetStatus returns the Status field value if set, zero value otherwise.
+func (o *ObjectLegalHoldConfiguration) GetStatus() string {
+ if o == nil || IsNil(o.Status) {
+ var ret string
+ return ret
+ }
+ return *o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectLegalHoldConfiguration) GetStatusOk() (*string, bool) {
+ if o == nil || IsNil(o.Status) {
+ return nil, false
+ }
+ return o.Status, true
+}
+
+// HasStatus returns a boolean if a field has been set.
+func (o *ObjectLegalHoldConfiguration) HasStatus() bool {
+ if o != nil && !IsNil(o.Status) {
+ return true
+ }
+
+ return false
+}
+
+// SetStatus gets a reference to the given string and assigns it to the Status field.
+func (o *ObjectLegalHoldConfiguration) SetStatus(v string) {
+ o.Status = &v
+}
+
+func (o ObjectLegalHoldConfiguration) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ObjectLegalHoldConfiguration) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Status) {
+ toSerialize["Status"] = o.Status
+ }
+ return toSerialize, nil
+}
+
+type NullableObjectLegalHoldConfiguration struct {
+ value *ObjectLegalHoldConfiguration
+ isSet bool
+}
+
+func (v NullableObjectLegalHoldConfiguration) Get() *ObjectLegalHoldConfiguration {
+ return v.value
+}
+
+func (v *NullableObjectLegalHoldConfiguration) Set(val *ObjectLegalHoldConfiguration) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableObjectLegalHoldConfiguration) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableObjectLegalHoldConfiguration) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableObjectLegalHoldConfiguration(val *ObjectLegalHoldConfiguration) *NullableObjectLegalHoldConfiguration {
+ return &NullableObjectLegalHoldConfiguration{value: val, isSet: true}
+}
+
+func (v NullableObjectLegalHoldConfiguration) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableObjectLegalHoldConfiguration) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_lock_retention.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_lock_retention.go
new file mode 100644
index 0000000000..8176d6dd83
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_lock_retention.go
@@ -0,0 +1,167 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ObjectLockRetention type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ObjectLockRetention{}
+
+// ObjectLockRetention A Retention configuration for an object.
+type ObjectLockRetention struct {
+ XMLName xml.Name `xml:"Retention"`
+ // Indicates the Retention mode for the specified object.
+ Mode *string `json:"Mode,omitempty" xml:"Mode"`
+ // The date on which this Object Lock Retention will expire.
+ RetainUntilDate *string `json:"RetainUntilDate,omitempty" xml:"RetainUntilDate"`
+}
+
+// NewObjectLockRetention instantiates a new ObjectLockRetention object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewObjectLockRetention() *ObjectLockRetention {
+ this := ObjectLockRetention{}
+
+ return &this
+}
+
+// NewObjectLockRetentionWithDefaults instantiates a new ObjectLockRetention object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewObjectLockRetentionWithDefaults() *ObjectLockRetention {
+ this := ObjectLockRetention{}
+ return &this
+}
+
+// GetMode returns the Mode field value if set, zero value otherwise.
+func (o *ObjectLockRetention) GetMode() string {
+ if o == nil || IsNil(o.Mode) {
+ var ret string
+ return ret
+ }
+ return *o.Mode
+}
+
+// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectLockRetention) GetModeOk() (*string, bool) {
+ if o == nil || IsNil(o.Mode) {
+ return nil, false
+ }
+ return o.Mode, true
+}
+
+// HasMode returns a boolean if a field has been set.
+func (o *ObjectLockRetention) HasMode() bool {
+ if o != nil && !IsNil(o.Mode) {
+ return true
+ }
+
+ return false
+}
+
+// SetMode gets a reference to the given string and assigns it to the Mode field.
+func (o *ObjectLockRetention) SetMode(v string) {
+ o.Mode = &v
+}
+
+// GetRetainUntilDate returns the RetainUntilDate field value if set, zero value otherwise.
+func (o *ObjectLockRetention) GetRetainUntilDate() string {
+ if o == nil || IsNil(o.RetainUntilDate) {
+ var ret string
+ return ret
+ }
+ return *o.RetainUntilDate
+}
+
+// GetRetainUntilDateOk returns a tuple with the RetainUntilDate field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectLockRetention) GetRetainUntilDateOk() (*string, bool) {
+ if o == nil || IsNil(o.RetainUntilDate) {
+ return nil, false
+ }
+ return o.RetainUntilDate, true
+}
+
+// HasRetainUntilDate returns a boolean if a field has been set.
+func (o *ObjectLockRetention) HasRetainUntilDate() bool {
+ if o != nil && !IsNil(o.RetainUntilDate) {
+ return true
+ }
+
+ return false
+}
+
+// SetRetainUntilDate gets a reference to the given string and assigns it to the RetainUntilDate field.
+func (o *ObjectLockRetention) SetRetainUntilDate(v string) {
+ o.RetainUntilDate = &v
+}
+
+func (o ObjectLockRetention) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ObjectLockRetention) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Mode) {
+ toSerialize["Mode"] = o.Mode
+ }
+ if !IsNil(o.RetainUntilDate) {
+ toSerialize["RetainUntilDate"] = o.RetainUntilDate
+ }
+ return toSerialize, nil
+}
+
+type NullableObjectLockRetention struct {
+ value *ObjectLockRetention
+ isSet bool
+}
+
+func (v NullableObjectLockRetention) Get() *ObjectLockRetention {
+ return v.value
+}
+
+func (v *NullableObjectLockRetention) Set(val *ObjectLockRetention) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableObjectLockRetention) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableObjectLockRetention) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableObjectLockRetention(val *ObjectLockRetention) *NullableObjectLockRetention {
+ return &NullableObjectLockRetention{value: val, isSet: true}
+}
+
+func (v NullableObjectLockRetention) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableObjectLockRetention) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_lock_rule.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_lock_rule.go
new file mode 100644
index 0000000000..8eb2f96b22
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_lock_rule.go
@@ -0,0 +1,129 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ObjectLockRule type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ObjectLockRule{}
+
+// ObjectLockRule The container element for an Object Lock rule.
+type ObjectLockRule struct {
+ XMLName xml.Name `xml:"Rule"`
+ DefaultRetention *DefaultRetention `json:"DefaultRetention,omitempty" xml:"DefaultRetention"`
+}
+
+// NewObjectLockRule instantiates a new ObjectLockRule object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewObjectLockRule() *ObjectLockRule {
+ this := ObjectLockRule{}
+
+ return &this
+}
+
+// NewObjectLockRuleWithDefaults instantiates a new ObjectLockRule object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewObjectLockRuleWithDefaults() *ObjectLockRule {
+ this := ObjectLockRule{}
+ return &this
+}
+
+// GetDefaultRetention returns the DefaultRetention field value if set, zero value otherwise.
+func (o *ObjectLockRule) GetDefaultRetention() DefaultRetention {
+ if o == nil || IsNil(o.DefaultRetention) {
+ var ret DefaultRetention
+ return ret
+ }
+ return *o.DefaultRetention
+}
+
+// GetDefaultRetentionOk returns a tuple with the DefaultRetention field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectLockRule) GetDefaultRetentionOk() (*DefaultRetention, bool) {
+ if o == nil || IsNil(o.DefaultRetention) {
+ return nil, false
+ }
+ return o.DefaultRetention, true
+}
+
+// HasDefaultRetention returns a boolean if a field has been set.
+func (o *ObjectLockRule) HasDefaultRetention() bool {
+ if o != nil && !IsNil(o.DefaultRetention) {
+ return true
+ }
+
+ return false
+}
+
+// SetDefaultRetention gets a reference to the given DefaultRetention and assigns it to the DefaultRetention field.
+func (o *ObjectLockRule) SetDefaultRetention(v DefaultRetention) {
+ o.DefaultRetention = &v
+}
+
+func (o ObjectLockRule) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ObjectLockRule) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DefaultRetention) {
+ toSerialize["DefaultRetention"] = o.DefaultRetention
+ }
+ return toSerialize, nil
+}
+
+type NullableObjectLockRule struct {
+ value *ObjectLockRule
+ isSet bool
+}
+
+func (v NullableObjectLockRule) Get() *ObjectLockRule {
+ return v.value
+}
+
+func (v *NullableObjectLockRule) Set(val *ObjectLockRule) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableObjectLockRule) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableObjectLockRule) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableObjectLockRule(val *ObjectLockRule) *NullableObjectLockRule {
+ return &NullableObjectLockRule{value: val, isSet: true}
+}
+
+func (v NullableObjectLockRule) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableObjectLockRule) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_storage_class.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_storage_class.go
new file mode 100644
index 0000000000..f980d1f1a8
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_storage_class.go
@@ -0,0 +1,83 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ObjectStorageClass the model 'ObjectStorageClass'
+type ObjectStorageClass string
+
+// List of ObjectStorageClass
+const (
+ OBJECTSTORAGECLASS_STANDARD ObjectStorageClass = "STANDARD"
+)
+
+func (v *ObjectStorageClass) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ObjectStorageClass(value)
+ for _, existing := range []ObjectStorageClass{"STANDARD"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ObjectStorageClass", value)
+}
+
+// Ptr returns reference to ObjectStorageClass value
+func (v ObjectStorageClass) Ptr() *ObjectStorageClass {
+ return &v
+}
+
+type NullableObjectStorageClass struct {
+ value *ObjectStorageClass
+ isSet bool
+}
+
+func (v NullableObjectStorageClass) Get() *ObjectStorageClass {
+ return v.value
+}
+
+func (v *NullableObjectStorageClass) Set(val *ObjectStorageClass) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableObjectStorageClass) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableObjectStorageClass) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableObjectStorageClass(val *ObjectStorageClass) *NullableObjectStorageClass {
+ return &NullableObjectStorageClass{value: val, isSet: true}
+}
+
+func (v NullableObjectStorageClass) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableObjectStorageClass) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_version.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_version.go
new file mode 100644
index 0000000000..38ba9a0417
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_version.go
@@ -0,0 +1,388 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the ObjectVersion type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ObjectVersion{}
+
+// ObjectVersion The version of an object.
+type ObjectVersion struct {
+ XMLName xml.Name `xml:"Version"`
+ // Entity tag that identifies the object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.
+ ETag *string `json:"ETag,omitempty" xml:"ETag"`
+ // Size in bytes of the object
+ Size *int32 `json:"Size,omitempty" xml:"Size"`
+ StorageClass *ObjectVersionStorageClass `json:"StorageClass,omitempty" xml:"StorageClass"`
+ // The object key.
+ Key *string `json:"Key,omitempty" xml:"Key"`
+ // Version ID of an object.
+ VersionId *string `json:"VersionId,omitempty" xml:"VersionId"`
+ // Specifies whether the object is (true) or is not (false) the latest version of an object.
+ IsLatest *bool `json:"IsLatest,omitempty" xml:"IsLatest"`
+ // Creation date of the object.
+ LastModified *IonosTime `json:"LastModified,omitempty" xml:"LastModified"`
+ Owner *Owner `json:"Owner,omitempty" xml:"Owner"`
+}
+
+// NewObjectVersion instantiates a new ObjectVersion object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewObjectVersion() *ObjectVersion {
+ this := ObjectVersion{}
+
+ return &this
+}
+
+// NewObjectVersionWithDefaults instantiates a new ObjectVersion object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewObjectVersionWithDefaults() *ObjectVersion {
+ this := ObjectVersion{}
+ return &this
+}
+
+// GetETag returns the ETag field value if set, zero value otherwise.
+func (o *ObjectVersion) GetETag() string {
+ if o == nil || IsNil(o.ETag) {
+ var ret string
+ return ret
+ }
+ return *o.ETag
+}
+
+// GetETagOk returns a tuple with the ETag field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectVersion) GetETagOk() (*string, bool) {
+ if o == nil || IsNil(o.ETag) {
+ return nil, false
+ }
+ return o.ETag, true
+}
+
+// HasETag returns a boolean if a field has been set.
+func (o *ObjectVersion) HasETag() bool {
+ if o != nil && !IsNil(o.ETag) {
+ return true
+ }
+
+ return false
+}
+
+// SetETag gets a reference to the given string and assigns it to the ETag field.
+func (o *ObjectVersion) SetETag(v string) {
+ o.ETag = &v
+}
+
+// GetSize returns the Size field value if set, zero value otherwise.
+func (o *ObjectVersion) GetSize() int32 {
+ if o == nil || IsNil(o.Size) {
+ var ret int32
+ return ret
+ }
+ return *o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectVersion) GetSizeOk() (*int32, bool) {
+ if o == nil || IsNil(o.Size) {
+ return nil, false
+ }
+ return o.Size, true
+}
+
+// HasSize returns a boolean if a field has been set.
+func (o *ObjectVersion) HasSize() bool {
+ if o != nil && !IsNil(o.Size) {
+ return true
+ }
+
+ return false
+}
+
+// SetSize gets a reference to the given int32 and assigns it to the Size field.
+func (o *ObjectVersion) SetSize(v int32) {
+ o.Size = &v
+}
+
+// GetStorageClass returns the StorageClass field value if set, zero value otherwise.
+func (o *ObjectVersion) GetStorageClass() ObjectVersionStorageClass {
+ if o == nil || IsNil(o.StorageClass) {
+ var ret ObjectVersionStorageClass
+ return ret
+ }
+ return *o.StorageClass
+}
+
+// GetStorageClassOk returns a tuple with the StorageClass field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectVersion) GetStorageClassOk() (*ObjectVersionStorageClass, bool) {
+ if o == nil || IsNil(o.StorageClass) {
+ return nil, false
+ }
+ return o.StorageClass, true
+}
+
+// HasStorageClass returns a boolean if a field has been set.
+func (o *ObjectVersion) HasStorageClass() bool {
+ if o != nil && !IsNil(o.StorageClass) {
+ return true
+ }
+
+ return false
+}
+
+// SetStorageClass gets a reference to the given ObjectVersionStorageClass and assigns it to the StorageClass field.
+func (o *ObjectVersion) SetStorageClass(v ObjectVersionStorageClass) {
+ o.StorageClass = &v
+}
+
+// GetKey returns the Key field value if set, zero value otherwise.
+func (o *ObjectVersion) GetKey() string {
+ if o == nil || IsNil(o.Key) {
+ var ret string
+ return ret
+ }
+ return *o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectVersion) GetKeyOk() (*string, bool) {
+ if o == nil || IsNil(o.Key) {
+ return nil, false
+ }
+ return o.Key, true
+}
+
+// HasKey returns a boolean if a field has been set.
+func (o *ObjectVersion) HasKey() bool {
+ if o != nil && !IsNil(o.Key) {
+ return true
+ }
+
+ return false
+}
+
+// SetKey gets a reference to the given string and assigns it to the Key field.
+func (o *ObjectVersion) SetKey(v string) {
+ o.Key = &v
+}
+
+// GetVersionId returns the VersionId field value if set, zero value otherwise.
+func (o *ObjectVersion) GetVersionId() string {
+ if o == nil || IsNil(o.VersionId) {
+ var ret string
+ return ret
+ }
+ return *o.VersionId
+}
+
+// GetVersionIdOk returns a tuple with the VersionId field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectVersion) GetVersionIdOk() (*string, bool) {
+ if o == nil || IsNil(o.VersionId) {
+ return nil, false
+ }
+ return o.VersionId, true
+}
+
+// HasVersionId returns a boolean if a field has been set.
+func (o *ObjectVersion) HasVersionId() bool {
+ if o != nil && !IsNil(o.VersionId) {
+ return true
+ }
+
+ return false
+}
+
+// SetVersionId gets a reference to the given string and assigns it to the VersionId field.
+func (o *ObjectVersion) SetVersionId(v string) {
+ o.VersionId = &v
+}
+
+// GetIsLatest returns the IsLatest field value if set, zero value otherwise.
+func (o *ObjectVersion) GetIsLatest() bool {
+ if o == nil || IsNil(o.IsLatest) {
+ var ret bool
+ return ret
+ }
+ return *o.IsLatest
+}
+
+// GetIsLatestOk returns a tuple with the IsLatest field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectVersion) GetIsLatestOk() (*bool, bool) {
+ if o == nil || IsNil(o.IsLatest) {
+ return nil, false
+ }
+ return o.IsLatest, true
+}
+
+// HasIsLatest returns a boolean if a field has been set.
+func (o *ObjectVersion) HasIsLatest() bool {
+ if o != nil && !IsNil(o.IsLatest) {
+ return true
+ }
+
+ return false
+}
+
+// SetIsLatest gets a reference to the given bool and assigns it to the IsLatest field.
+func (o *ObjectVersion) SetIsLatest(v bool) {
+ o.IsLatest = &v
+}
+
+// GetLastModified returns the LastModified field value if set, zero value otherwise.
+func (o *ObjectVersion) GetLastModified() time.Time {
+ if o == nil || IsNil(o.LastModified) {
+ var ret time.Time
+ return ret
+ }
+ return o.LastModified.Time
+}
+
+// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectVersion) GetLastModifiedOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.LastModified) {
+ return nil, false
+ }
+ return &o.LastModified.Time, true
+}
+
+// HasLastModified returns a boolean if a field has been set.
+func (o *ObjectVersion) HasLastModified() bool {
+ if o != nil && !IsNil(o.LastModified) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastModified gets a reference to the given time.Time and assigns it to the LastModified field.
+func (o *ObjectVersion) SetLastModified(v time.Time) {
+ o.LastModified = &IonosTime{v}
+}
+
+// GetOwner returns the Owner field value if set, zero value otherwise.
+func (o *ObjectVersion) GetOwner() Owner {
+ if o == nil || IsNil(o.Owner) {
+ var ret Owner
+ return ret
+ }
+ return *o.Owner
+}
+
+// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ObjectVersion) GetOwnerOk() (*Owner, bool) {
+ if o == nil || IsNil(o.Owner) {
+ return nil, false
+ }
+ return o.Owner, true
+}
+
+// HasOwner returns a boolean if a field has been set.
+func (o *ObjectVersion) HasOwner() bool {
+ if o != nil && !IsNil(o.Owner) {
+ return true
+ }
+
+ return false
+}
+
+// SetOwner gets a reference to the given Owner and assigns it to the Owner field.
+func (o *ObjectVersion) SetOwner(v Owner) {
+ o.Owner = &v
+}
+
+func (o ObjectVersion) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ObjectVersion) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ETag) {
+ toSerialize["ETag"] = o.ETag
+ }
+ if !IsNil(o.Size) {
+ toSerialize["Size"] = o.Size
+ }
+ if !IsNil(o.StorageClass) {
+ toSerialize["StorageClass"] = o.StorageClass
+ }
+ if !IsNil(o.Key) {
+ toSerialize["Key"] = o.Key
+ }
+ if !IsNil(o.VersionId) {
+ toSerialize["VersionId"] = o.VersionId
+ }
+ if !IsNil(o.IsLatest) {
+ toSerialize["IsLatest"] = o.IsLatest
+ }
+ if !IsNil(o.LastModified) {
+ toSerialize["LastModified"] = o.LastModified
+ }
+ if !IsNil(o.Owner) {
+ toSerialize["Owner"] = o.Owner
+ }
+ return toSerialize, nil
+}
+
+type NullableObjectVersion struct {
+ value *ObjectVersion
+ isSet bool
+}
+
+func (v NullableObjectVersion) Get() *ObjectVersion {
+ return v.value
+}
+
+func (v *NullableObjectVersion) Set(val *ObjectVersion) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableObjectVersion) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableObjectVersion) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableObjectVersion(val *ObjectVersion) *NullableObjectVersion {
+ return &NullableObjectVersion{value: val, isSet: true}
+}
+
+func (v NullableObjectVersion) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableObjectVersion) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_version_storage_class.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_version_storage_class.go
new file mode 100644
index 0000000000..a395cfdffa
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_object_version_storage_class.go
@@ -0,0 +1,83 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ObjectVersionStorageClass the model 'ObjectVersionStorageClass'
+type ObjectVersionStorageClass string
+
+// List of ObjectVersionStorageClass
+const (
+ OBJECTVERSIONSTORAGECLASS_STANDARD ObjectVersionStorageClass = "STANDARD"
+)
+
+func (v *ObjectVersionStorageClass) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ObjectVersionStorageClass(value)
+ for _, existing := range []ObjectVersionStorageClass{"STANDARD"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ObjectVersionStorageClass", value)
+}
+
+// Ptr returns reference to ObjectVersionStorageClass value
+func (v ObjectVersionStorageClass) Ptr() *ObjectVersionStorageClass {
+ return &v
+}
+
+type NullableObjectVersionStorageClass struct {
+ value *ObjectVersionStorageClass
+ isSet bool
+}
+
+func (v NullableObjectVersionStorageClass) Get() *ObjectVersionStorageClass {
+ return v.value
+}
+
+func (v *NullableObjectVersionStorageClass) Set(val *ObjectVersionStorageClass) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableObjectVersionStorageClass) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableObjectVersionStorageClass) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableObjectVersionStorageClass(val *ObjectVersionStorageClass) *NullableObjectVersionStorageClass {
+ return &NullableObjectVersionStorageClass{value: val, isSet: true}
+}
+
+func (v NullableObjectVersionStorageClass) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableObjectVersionStorageClass) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_output_serialization.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_output_serialization.go
new file mode 100644
index 0000000000..d45f4ae8e6
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_output_serialization.go
@@ -0,0 +1,165 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the OutputSerialization type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &OutputSerialization{}
+
+// OutputSerialization Describes how results of the Select job are serialized.
+type OutputSerialization struct {
+ XMLName xml.Name `xml:"OutputSerialization"`
+ CSV *CSVOutput `json:"CSV,omitempty" xml:"CSV"`
+ JSON *JSONOutput `json:"JSON,omitempty" xml:"JSON"`
+}
+
+// NewOutputSerialization instantiates a new OutputSerialization object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewOutputSerialization() *OutputSerialization {
+ this := OutputSerialization{}
+
+ return &this
+}
+
+// NewOutputSerializationWithDefaults instantiates a new OutputSerialization object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewOutputSerializationWithDefaults() *OutputSerialization {
+ this := OutputSerialization{}
+ return &this
+}
+
+// GetCSV returns the CSV field value if set, zero value otherwise.
+func (o *OutputSerialization) GetCSV() CSVOutput {
+ if o == nil || IsNil(o.CSV) {
+ var ret CSVOutput
+ return ret
+ }
+ return *o.CSV
+}
+
+// GetCSVOk returns a tuple with the CSV field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OutputSerialization) GetCSVOk() (*CSVOutput, bool) {
+ if o == nil || IsNil(o.CSV) {
+ return nil, false
+ }
+ return o.CSV, true
+}
+
+// HasCSV returns a boolean if a field has been set.
+func (o *OutputSerialization) HasCSV() bool {
+ if o != nil && !IsNil(o.CSV) {
+ return true
+ }
+
+ return false
+}
+
+// SetCSV gets a reference to the given CSVOutput and assigns it to the CSV field.
+func (o *OutputSerialization) SetCSV(v CSVOutput) {
+ o.CSV = &v
+}
+
+// GetJSON returns the JSON field value if set, zero value otherwise.
+func (o *OutputSerialization) GetJSON() JSONOutput {
+ if o == nil || IsNil(o.JSON) {
+ var ret JSONOutput
+ return ret
+ }
+ return *o.JSON
+}
+
+// GetJSONOk returns a tuple with the JSON field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *OutputSerialization) GetJSONOk() (*JSONOutput, bool) {
+ if o == nil || IsNil(o.JSON) {
+ return nil, false
+ }
+ return o.JSON, true
+}
+
+// HasJSON returns a boolean if a field has been set.
+func (o *OutputSerialization) HasJSON() bool {
+ if o != nil && !IsNil(o.JSON) {
+ return true
+ }
+
+ return false
+}
+
+// SetJSON gets a reference to the given JSONOutput and assigns it to the JSON field.
+func (o *OutputSerialization) SetJSON(v JSONOutput) {
+ o.JSON = &v
+}
+
+func (o OutputSerialization) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o OutputSerialization) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CSV) {
+ toSerialize["CSV"] = o.CSV
+ }
+ if !IsNil(o.JSON) {
+ toSerialize["JSON"] = o.JSON
+ }
+ return toSerialize, nil
+}
+
+type NullableOutputSerialization struct {
+ value *OutputSerialization
+ isSet bool
+}
+
+func (v NullableOutputSerialization) Get() *OutputSerialization {
+ return v.value
+}
+
+func (v *NullableOutputSerialization) Set(val *OutputSerialization) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableOutputSerialization) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableOutputSerialization) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableOutputSerialization(val *OutputSerialization) *NullableOutputSerialization {
+ return &NullableOutputSerialization{value: val, isSet: true}
+}
+
+func (v NullableOutputSerialization) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableOutputSerialization) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_owner.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_owner.go
new file mode 100644
index 0000000000..f6d66bcdab
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_owner.go
@@ -0,0 +1,167 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Owner type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Owner{}
+
+// Owner Container for the owner's ID and display name.
+type Owner struct {
+ XMLName xml.Name `xml:"Owner"`
+ // Container for the Contract Number of the owner.
+ ID *int32 `json:"ID,omitempty" xml:"ID"`
+ // Container for the display name of the owner.
+ DisplayName *string `json:"DisplayName,omitempty" xml:"DisplayName"`
+}
+
+// NewOwner instantiates a new Owner object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewOwner() *Owner {
+ this := Owner{}
+
+ return &this
+}
+
+// NewOwnerWithDefaults instantiates a new Owner object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewOwnerWithDefaults() *Owner {
+ this := Owner{}
+ return &this
+}
+
+// GetID returns the ID field value if set, zero value otherwise.
+func (o *Owner) GetID() int32 {
+ if o == nil || IsNil(o.ID) {
+ var ret int32
+ return ret
+ }
+ return *o.ID
+}
+
+// GetIDOk returns a tuple with the ID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Owner) GetIDOk() (*int32, bool) {
+ if o == nil || IsNil(o.ID) {
+ return nil, false
+ }
+ return o.ID, true
+}
+
+// HasID returns a boolean if a field has been set.
+func (o *Owner) HasID() bool {
+ if o != nil && !IsNil(o.ID) {
+ return true
+ }
+
+ return false
+}
+
+// SetID gets a reference to the given int32 and assigns it to the ID field.
+func (o *Owner) SetID(v int32) {
+ o.ID = &v
+}
+
+// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
+func (o *Owner) GetDisplayName() string {
+ if o == nil || IsNil(o.DisplayName) {
+ var ret string
+ return ret
+ }
+ return *o.DisplayName
+}
+
+// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Owner) GetDisplayNameOk() (*string, bool) {
+ if o == nil || IsNil(o.DisplayName) {
+ return nil, false
+ }
+ return o.DisplayName, true
+}
+
+// HasDisplayName returns a boolean if a field has been set.
+func (o *Owner) HasDisplayName() bool {
+ if o != nil && !IsNil(o.DisplayName) {
+ return true
+ }
+
+ return false
+}
+
+// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
+func (o *Owner) SetDisplayName(v string) {
+ o.DisplayName = &v
+}
+
+func (o Owner) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Owner) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ID) {
+ toSerialize["ID"] = o.ID
+ }
+ if !IsNil(o.DisplayName) {
+ toSerialize["DisplayName"] = o.DisplayName
+ }
+ return toSerialize, nil
+}
+
+type NullableOwner struct {
+ value *Owner
+ isSet bool
+}
+
+func (v NullableOwner) Get() *Owner {
+ return v.value
+}
+
+func (v *NullableOwner) Set(val *Owner) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableOwner) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableOwner) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableOwner(val *Owner) *NullableOwner {
+ return &NullableOwner{value: val, isSet: true}
+}
+
+func (v NullableOwner) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableOwner) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_part.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_part.go
new file mode 100644
index 0000000000..ca648cc093
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_part.go
@@ -0,0 +1,242 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "time"
+)
+
+import "encoding/xml"
+
+// checks if the Part type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Part{}
+
+// Part Container for elements related to a part.
+type Part struct {
+ XMLName xml.Name `xml:"Part"`
+ // Part number that identifies the part.
+ PartNumber *int32 `json:"PartNumber,omitempty" xml:"PartNumber"`
+ // Creation date of the object.
+ LastModified *IonosTime `json:"LastModified,omitempty" xml:"LastModified"`
+ // Entity tag that identifies the object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.
+ ETag *string `json:"ETag,omitempty" xml:"ETag"`
+ // Size in bytes of the object
+ Size *int32 `json:"Size,omitempty" xml:"Size"`
+}
+
+// NewPart instantiates a new Part object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPart() *Part {
+ this := Part{}
+
+ return &this
+}
+
+// NewPartWithDefaults instantiates a new Part object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPartWithDefaults() *Part {
+ this := Part{}
+ return &this
+}
+
+// GetPartNumber returns the PartNumber field value if set, zero value otherwise.
+func (o *Part) GetPartNumber() int32 {
+ if o == nil || IsNil(o.PartNumber) {
+ var ret int32
+ return ret
+ }
+ return *o.PartNumber
+}
+
+// GetPartNumberOk returns a tuple with the PartNumber field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Part) GetPartNumberOk() (*int32, bool) {
+ if o == nil || IsNil(o.PartNumber) {
+ return nil, false
+ }
+ return o.PartNumber, true
+}
+
+// HasPartNumber returns a boolean if a field has been set.
+func (o *Part) HasPartNumber() bool {
+ if o != nil && !IsNil(o.PartNumber) {
+ return true
+ }
+
+ return false
+}
+
+// SetPartNumber gets a reference to the given int32 and assigns it to the PartNumber field.
+func (o *Part) SetPartNumber(v int32) {
+ o.PartNumber = &v
+}
+
+// GetLastModified returns the LastModified field value if set, zero value otherwise.
+func (o *Part) GetLastModified() time.Time {
+ if o == nil || IsNil(o.LastModified) {
+ var ret time.Time
+ return ret
+ }
+ return o.LastModified.Time
+}
+
+// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Part) GetLastModifiedOk() (*time.Time, bool) {
+ if o == nil || IsNil(o.LastModified) {
+ return nil, false
+ }
+ return &o.LastModified.Time, true
+}
+
+// HasLastModified returns a boolean if a field has been set.
+func (o *Part) HasLastModified() bool {
+ if o != nil && !IsNil(o.LastModified) {
+ return true
+ }
+
+ return false
+}
+
+// SetLastModified gets a reference to the given time.Time and assigns it to the LastModified field.
+func (o *Part) SetLastModified(v time.Time) {
+ o.LastModified = &IonosTime{v}
+}
+
+// GetETag returns the ETag field value if set, zero value otherwise.
+func (o *Part) GetETag() string {
+ if o == nil || IsNil(o.ETag) {
+ var ret string
+ return ret
+ }
+ return *o.ETag
+}
+
+// GetETagOk returns a tuple with the ETag field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Part) GetETagOk() (*string, bool) {
+ if o == nil || IsNil(o.ETag) {
+ return nil, false
+ }
+ return o.ETag, true
+}
+
+// HasETag returns a boolean if a field has been set.
+func (o *Part) HasETag() bool {
+ if o != nil && !IsNil(o.ETag) {
+ return true
+ }
+
+ return false
+}
+
+// SetETag gets a reference to the given string and assigns it to the ETag field.
+func (o *Part) SetETag(v string) {
+ o.ETag = &v
+}
+
+// GetSize returns the Size field value if set, zero value otherwise.
+func (o *Part) GetSize() int32 {
+ if o == nil || IsNil(o.Size) {
+ var ret int32
+ return ret
+ }
+ return *o.Size
+}
+
+// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Part) GetSizeOk() (*int32, bool) {
+ if o == nil || IsNil(o.Size) {
+ return nil, false
+ }
+ return o.Size, true
+}
+
+// HasSize returns a boolean if a field has been set.
+func (o *Part) HasSize() bool {
+ if o != nil && !IsNil(o.Size) {
+ return true
+ }
+
+ return false
+}
+
+// SetSize gets a reference to the given int32 and assigns it to the Size field.
+func (o *Part) SetSize(v int32) {
+ o.Size = &v
+}
+
+func (o Part) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Part) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.PartNumber) {
+ toSerialize["PartNumber"] = o.PartNumber
+ }
+ if !IsNil(o.LastModified) {
+ toSerialize["LastModified"] = o.LastModified
+ }
+ if !IsNil(o.ETag) {
+ toSerialize["ETag"] = o.ETag
+ }
+ if !IsNil(o.Size) {
+ toSerialize["Size"] = o.Size
+ }
+ return toSerialize, nil
+}
+
+type NullablePart struct {
+ value *Part
+ isSet bool
+}
+
+func (v NullablePart) Get() *Part {
+ return v.value
+}
+
+func (v *NullablePart) Set(val *Part) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePart) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePart) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePart(val *Part) *NullablePart {
+ return &NullablePart{value: val, isSet: true}
+}
+
+func (v NullablePart) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePart) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_policy_status.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_policy_status.go
new file mode 100644
index 0000000000..78f6998cf3
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_policy_status.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PolicyStatus type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PolicyStatus{}
+
+// PolicyStatus The container element for a bucket's policy status.
+type PolicyStatus struct {
+ XMLName xml.Name `xml:"PolicyStatus"`
+ // The policy status for this bucket: - `true` indicates that this bucket is public. - `false` indicates that this bucket is private.
+ IsPublic *bool `json:"IsPublic,omitempty" xml:"IsPublic"`
+}
+
+// NewPolicyStatus instantiates a new PolicyStatus object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPolicyStatus() *PolicyStatus {
+ this := PolicyStatus{}
+
+ return &this
+}
+
+// NewPolicyStatusWithDefaults instantiates a new PolicyStatus object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPolicyStatusWithDefaults() *PolicyStatus {
+ this := PolicyStatus{}
+ return &this
+}
+
+// GetIsPublic returns the IsPublic field value if set, zero value otherwise.
+func (o *PolicyStatus) GetIsPublic() bool {
+ if o == nil || IsNil(o.IsPublic) {
+ var ret bool
+ return ret
+ }
+ return *o.IsPublic
+}
+
+// GetIsPublicOk returns a tuple with the IsPublic field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PolicyStatus) GetIsPublicOk() (*bool, bool) {
+ if o == nil || IsNil(o.IsPublic) {
+ return nil, false
+ }
+ return o.IsPublic, true
+}
+
+// HasIsPublic returns a boolean if a field has been set.
+func (o *PolicyStatus) HasIsPublic() bool {
+ if o != nil && !IsNil(o.IsPublic) {
+ return true
+ }
+
+ return false
+}
+
+// SetIsPublic gets a reference to the given bool and assigns it to the IsPublic field.
+func (o *PolicyStatus) SetIsPublic(v bool) {
+ o.IsPublic = &v
+}
+
+func (o PolicyStatus) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PolicyStatus) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.IsPublic) {
+ toSerialize["IsPublic"] = o.IsPublic
+ }
+ return toSerialize, nil
+}
+
+type NullablePolicyStatus struct {
+ value *PolicyStatus
+ isSet bool
+}
+
+func (v NullablePolicyStatus) Get() *PolicyStatus {
+ return v.value
+}
+
+func (v *NullablePolicyStatus) Set(val *PolicyStatus) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePolicyStatus) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePolicyStatus) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePolicyStatus(val *PolicyStatus) *NullablePolicyStatus {
+ return &NullablePolicyStatus{value: val, isSet: true}
+}
+
+func (v NullablePolicyStatus) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePolicyStatus) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_post_object_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_post_object_request.go
new file mode 100644
index 0000000000..f66f35836e
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_post_object_request.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the POSTObjectRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &POSTObjectRequest{}
+
+// POSTObjectRequest struct for POSTObjectRequest
+type POSTObjectRequest struct {
+ XMLName xml.Name `xml:"POSTObjectRequest"`
+ // Object data.
+ Body *string `json:"Body,omitempty" xml:"Body"`
+}
+
+// NewPOSTObjectRequest instantiates a new POSTObjectRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPOSTObjectRequest() *POSTObjectRequest {
+ this := POSTObjectRequest{}
+
+ return &this
+}
+
+// NewPOSTObjectRequestWithDefaults instantiates a new POSTObjectRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPOSTObjectRequestWithDefaults() *POSTObjectRequest {
+ this := POSTObjectRequest{}
+ return &this
+}
+
+// GetBody returns the Body field value if set, zero value otherwise.
+func (o *POSTObjectRequest) GetBody() string {
+ if o == nil || IsNil(o.Body) {
+ var ret string
+ return ret
+ }
+ return *o.Body
+}
+
+// GetBodyOk returns a tuple with the Body field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *POSTObjectRequest) GetBodyOk() (*string, bool) {
+ if o == nil || IsNil(o.Body) {
+ return nil, false
+ }
+ return o.Body, true
+}
+
+// HasBody returns a boolean if a field has been set.
+func (o *POSTObjectRequest) HasBody() bool {
+ if o != nil && !IsNil(o.Body) {
+ return true
+ }
+
+ return false
+}
+
+// SetBody gets a reference to the given string and assigns it to the Body field.
+func (o *POSTObjectRequest) SetBody(v string) {
+ o.Body = &v
+}
+
+func (o POSTObjectRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o POSTObjectRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Body) {
+ toSerialize["Body"] = o.Body
+ }
+ return toSerialize, nil
+}
+
+type NullablePOSTObjectRequest struct {
+ value *POSTObjectRequest
+ isSet bool
+}
+
+func (v NullablePOSTObjectRequest) Get() *POSTObjectRequest {
+ return v.value
+}
+
+func (v *NullablePOSTObjectRequest) Set(val *POSTObjectRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePOSTObjectRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePOSTObjectRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePOSTObjectRequest(val *POSTObjectRequest) *NullablePOSTObjectRequest {
+ return &NullablePOSTObjectRequest{value: val, isSet: true}
+}
+
+func (v NullablePOSTObjectRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePOSTObjectRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_principal.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_principal.go
new file mode 100644
index 0000000000..5cf6595ecf
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_principal.go
@@ -0,0 +1,158 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Principal type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Principal{}
+
+// Principal struct for Principal
+type Principal struct {
+ XMLName xml.Name `xml:"Principal"`
+ AWS []string `json:"AWS" xml:"AWS"`
+}
+
+// NewPrincipal instantiates a new Principal object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPrincipal(aWS []string) *Principal {
+ this := Principal{}
+
+ this.AWS = aWS
+
+ return &this
+}
+
+// NewPrincipalWithDefaults instantiates a new Principal object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPrincipalWithDefaults() *Principal {
+ this := Principal{}
+ return &this
+}
+
+// GetAWS returns the AWS field value
+func (o *Principal) GetAWS() []string {
+ if o == nil {
+ var ret []string
+ return ret
+ }
+
+ return o.AWS
+}
+
+// GetAWSOk returns a tuple with the AWS field value
+// and a boolean to check if the value has been set.
+func (o *Principal) GetAWSOk() ([]string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.AWS, true
+}
+
+// SetAWS sets field value
+func (o *Principal) SetAWS(v []string) {
+ o.AWS = v
+}
+
+func (o Principal) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Principal) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["AWS"] = o.AWS
+ return toSerialize, nil
+}
+
+type NullablePrincipal struct {
+ value *Principal
+ isSet bool
+}
+
+func (v NullablePrincipal) Get() *Principal {
+ return v.value
+}
+
+func (v *NullablePrincipal) Set(val *Principal) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePrincipal) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePrincipal) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePrincipal(val *Principal) *NullablePrincipal {
+ return &NullablePrincipal{value: val, isSet: true}
+}
+
+func (v NullablePrincipal) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePrincipal) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+// UnmarshalJSON handles AWS field being either a string or []string
+// Note: added in post-gen sdk generation
+func (o *Principal) UnmarshalJSON(src []byte) error {
+ // Reset to zero value to avoid stale data across unmarshals
+ *o = Principal{}
+
+ // Handle "Principal": "*" (wildcard string, not an object)
+ var s string
+ if err := json.Unmarshal(src, &s); err == nil {
+ if s == "*" {
+ o.AWS = []string{"*"}
+ return nil
+ }
+ }
+
+ var raw struct {
+ AWS json.RawMessage `json:"AWS"`
+ }
+ if err := json.Unmarshal(src, &raw); err != nil {
+ return err
+ }
+ if raw.AWS == nil {
+ return nil
+ }
+ var arr []string
+ if err := json.Unmarshal(raw.AWS, &arr); err == nil {
+ o.AWS = arr
+ return nil
+ }
+ s = ""
+ if err := json.Unmarshal(raw.AWS, &s); err != nil {
+ return err
+ }
+ o.AWS = []string{s}
+ return nil
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_principal_all_of.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_principal_all_of.go
new file mode 100644
index 0000000000..4a5170d7ea
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_principal_all_of.go
@@ -0,0 +1,121 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PrincipalAllOf type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PrincipalAllOf{}
+
+// PrincipalAllOf Statement applies to the specified IONOS Object Storage users.
+type PrincipalAllOf struct {
+ XMLName xml.Name `xml:"PrincipalAllOf"`
+ AWS []string `json:"AWS" xml:"AWS"`
+}
+
+// NewPrincipalAllOf instantiates a new PrincipalAllOf object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPrincipalAllOf(aWS []string) *PrincipalAllOf {
+ this := PrincipalAllOf{}
+
+ this.AWS = aWS
+
+ return &this
+}
+
+// NewPrincipalAllOfWithDefaults instantiates a new PrincipalAllOf object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPrincipalAllOfWithDefaults() *PrincipalAllOf {
+ this := PrincipalAllOf{}
+ return &this
+}
+
+// GetAWS returns the AWS field value
+func (o *PrincipalAllOf) GetAWS() []string {
+ if o == nil {
+ var ret []string
+ return ret
+ }
+
+ return o.AWS
+}
+
+// GetAWSOk returns a tuple with the AWS field value
+// and a boolean to check if the value has been set.
+func (o *PrincipalAllOf) GetAWSOk() ([]string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.AWS, true
+}
+
+// SetAWS sets field value
+func (o *PrincipalAllOf) SetAWS(v []string) {
+ o.AWS = v
+}
+
+func (o PrincipalAllOf) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PrincipalAllOf) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["AWS"] = o.AWS
+ return toSerialize, nil
+}
+
+type NullablePrincipalAllOf struct {
+ value *PrincipalAllOf
+ isSet bool
+}
+
+func (v NullablePrincipalAllOf) Get() *PrincipalAllOf {
+ return v.value
+}
+
+func (v *NullablePrincipalAllOf) Set(val *PrincipalAllOf) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePrincipalAllOf) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePrincipalAllOf) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePrincipalAllOf(val *PrincipalAllOf) *NullablePrincipalAllOf {
+ return &NullablePrincipalAllOf{value: val, isSet: true}
+}
+
+func (v NullablePrincipalAllOf) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePrincipalAllOf) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_cors_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_cors_request.go
new file mode 100644
index 0000000000..5c9b5a3596
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_cors_request.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutBucketCorsRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutBucketCorsRequest{}
+
+// PutBucketCorsRequest Describes the cross-origin access configuration for objects in an IONOS Object Storage bucket.
+type PutBucketCorsRequest struct {
+ XMLName xml.Name `xml:"CORSConfiguration"`
+ // A set of origins and methods (cross-origin access that you want to allow). You can add up to 100 rules to the configuration.
+ CORSRules []CORSRule `json:"CORSRules,omitempty" xml:"CORSRule"`
+}
+
+// NewPutBucketCorsRequest instantiates a new PutBucketCorsRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutBucketCorsRequest() *PutBucketCorsRequest {
+ this := PutBucketCorsRequest{}
+
+ return &this
+}
+
+// NewPutBucketCorsRequestWithDefaults instantiates a new PutBucketCorsRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutBucketCorsRequestWithDefaults() *PutBucketCorsRequest {
+ this := PutBucketCorsRequest{}
+ return &this
+}
+
+// GetCORSRules returns the CORSRules field value if set, zero value otherwise.
+func (o *PutBucketCorsRequest) GetCORSRules() []CORSRule {
+ if o == nil || IsNil(o.CORSRules) {
+ var ret []CORSRule
+ return ret
+ }
+ return o.CORSRules
+}
+
+// GetCORSRulesOk returns a tuple with the CORSRules field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketCorsRequest) GetCORSRulesOk() ([]CORSRule, bool) {
+ if o == nil || IsNil(o.CORSRules) {
+ return nil, false
+ }
+ return o.CORSRules, true
+}
+
+// HasCORSRules returns a boolean if a field has been set.
+func (o *PutBucketCorsRequest) HasCORSRules() bool {
+ if o != nil && !IsNil(o.CORSRules) {
+ return true
+ }
+
+ return false
+}
+
+// SetCORSRules gets a reference to the given []CORSRule and assigns it to the CORSRules field.
+func (o *PutBucketCorsRequest) SetCORSRules(v []CORSRule) {
+ o.CORSRules = v
+}
+
+func (o PutBucketCorsRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutBucketCorsRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CORSRules) {
+ toSerialize["CORSRules"] = o.CORSRules
+ }
+ return toSerialize, nil
+}
+
+type NullablePutBucketCorsRequest struct {
+ value *PutBucketCorsRequest
+ isSet bool
+}
+
+func (v NullablePutBucketCorsRequest) Get() *PutBucketCorsRequest {
+ return v.value
+}
+
+func (v *NullablePutBucketCorsRequest) Set(val *PutBucketCorsRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutBucketCorsRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutBucketCorsRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutBucketCorsRequest(val *PutBucketCorsRequest) *NullablePutBucketCorsRequest {
+ return &NullablePutBucketCorsRequest{value: val, isSet: true}
+}
+
+func (v NullablePutBucketCorsRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutBucketCorsRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_encryption_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_encryption_request.go
new file mode 100644
index 0000000000..527d69ceed
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_encryption_request.go
@@ -0,0 +1,129 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutBucketEncryptionRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutBucketEncryptionRequest{}
+
+// PutBucketEncryptionRequest Specifies the default server-side-encryption configuration. The valid value is AES256.
+type PutBucketEncryptionRequest struct {
+ XMLName xml.Name `xml:"ServerSideEncryptionConfiguration"`
+ Rules []ServerSideEncryptionRule `json:"Rules,omitempty" xml:"Rule"`
+}
+
+// NewPutBucketEncryptionRequest instantiates a new PutBucketEncryptionRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutBucketEncryptionRequest() *PutBucketEncryptionRequest {
+ this := PutBucketEncryptionRequest{}
+
+ return &this
+}
+
+// NewPutBucketEncryptionRequestWithDefaults instantiates a new PutBucketEncryptionRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutBucketEncryptionRequestWithDefaults() *PutBucketEncryptionRequest {
+ this := PutBucketEncryptionRequest{}
+ return &this
+}
+
+// GetRules returns the Rules field value if set, zero value otherwise.
+func (o *PutBucketEncryptionRequest) GetRules() []ServerSideEncryptionRule {
+ if o == nil || IsNil(o.Rules) {
+ var ret []ServerSideEncryptionRule
+ return ret
+ }
+ return o.Rules
+}
+
+// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketEncryptionRequest) GetRulesOk() ([]ServerSideEncryptionRule, bool) {
+ if o == nil || IsNil(o.Rules) {
+ return nil, false
+ }
+ return o.Rules, true
+}
+
+// HasRules returns a boolean if a field has been set.
+func (o *PutBucketEncryptionRequest) HasRules() bool {
+ if o != nil && !IsNil(o.Rules) {
+ return true
+ }
+
+ return false
+}
+
+// SetRules gets a reference to the given []ServerSideEncryptionRule and assigns it to the Rules field.
+func (o *PutBucketEncryptionRequest) SetRules(v []ServerSideEncryptionRule) {
+ o.Rules = v
+}
+
+func (o PutBucketEncryptionRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutBucketEncryptionRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Rules) {
+ toSerialize["Rules"] = o.Rules
+ }
+ return toSerialize, nil
+}
+
+type NullablePutBucketEncryptionRequest struct {
+ value *PutBucketEncryptionRequest
+ isSet bool
+}
+
+func (v NullablePutBucketEncryptionRequest) Get() *PutBucketEncryptionRequest {
+ return v.value
+}
+
+func (v *NullablePutBucketEncryptionRequest) Set(val *PutBucketEncryptionRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutBucketEncryptionRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutBucketEncryptionRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutBucketEncryptionRequest(val *PutBucketEncryptionRequest) *NullablePutBucketEncryptionRequest {
+ return &NullablePutBucketEncryptionRequest{value: val, isSet: true}
+}
+
+func (v NullablePutBucketEncryptionRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutBucketEncryptionRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_lifecycle_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_lifecycle_request.go
new file mode 100644
index 0000000000..ec00f63857
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_lifecycle_request.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutBucketLifecycleRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutBucketLifecycleRequest{}
+
+// PutBucketLifecycleRequest Container for lifecycle rules. You can add as many as 1000 rules.
+type PutBucketLifecycleRequest struct {
+ XMLName xml.Name `xml:"LifecycleConfiguration"`
+ // Container for a lifecycle rules.
+ Rules []Rule `json:"Rules,omitempty" xml:"Rule"`
+}
+
+// NewPutBucketLifecycleRequest instantiates a new PutBucketLifecycleRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutBucketLifecycleRequest() *PutBucketLifecycleRequest {
+ this := PutBucketLifecycleRequest{}
+
+ return &this
+}
+
+// NewPutBucketLifecycleRequestWithDefaults instantiates a new PutBucketLifecycleRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutBucketLifecycleRequestWithDefaults() *PutBucketLifecycleRequest {
+ this := PutBucketLifecycleRequest{}
+ return &this
+}
+
+// GetRules returns the Rules field value if set, zero value otherwise.
+func (o *PutBucketLifecycleRequest) GetRules() []Rule {
+ if o == nil || IsNil(o.Rules) {
+ var ret []Rule
+ return ret
+ }
+ return o.Rules
+}
+
+// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketLifecycleRequest) GetRulesOk() ([]Rule, bool) {
+ if o == nil || IsNil(o.Rules) {
+ return nil, false
+ }
+ return o.Rules, true
+}
+
+// HasRules returns a boolean if a field has been set.
+func (o *PutBucketLifecycleRequest) HasRules() bool {
+ if o != nil && !IsNil(o.Rules) {
+ return true
+ }
+
+ return false
+}
+
+// SetRules gets a reference to the given []Rule and assigns it to the Rules field.
+func (o *PutBucketLifecycleRequest) SetRules(v []Rule) {
+ o.Rules = v
+}
+
+func (o PutBucketLifecycleRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutBucketLifecycleRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Rules) {
+ toSerialize["Rules"] = o.Rules
+ }
+ return toSerialize, nil
+}
+
+type NullablePutBucketLifecycleRequest struct {
+ value *PutBucketLifecycleRequest
+ isSet bool
+}
+
+func (v NullablePutBucketLifecycleRequest) Get() *PutBucketLifecycleRequest {
+ return v.value
+}
+
+func (v *NullablePutBucketLifecycleRequest) Set(val *PutBucketLifecycleRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutBucketLifecycleRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutBucketLifecycleRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutBucketLifecycleRequest(val *PutBucketLifecycleRequest) *NullablePutBucketLifecycleRequest {
+ return &NullablePutBucketLifecycleRequest{value: val, isSet: true}
+}
+
+func (v NullablePutBucketLifecycleRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutBucketLifecycleRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_tagging_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_tagging_request.go
new file mode 100644
index 0000000000..ce538cb7bf
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_tagging_request.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutBucketTaggingRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutBucketTaggingRequest{}
+
+// PutBucketTaggingRequest Container for `TagSet` elements.
+type PutBucketTaggingRequest struct {
+ XMLName xml.Name `xml:"Tagging"`
+ // Contains the tag set.
+ TagSet []Tag `json:"TagSet,omitempty" xml:"TagSet>Tag"`
+}
+
+// NewPutBucketTaggingRequest instantiates a new PutBucketTaggingRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutBucketTaggingRequest() *PutBucketTaggingRequest {
+ this := PutBucketTaggingRequest{}
+
+ return &this
+}
+
+// NewPutBucketTaggingRequestWithDefaults instantiates a new PutBucketTaggingRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutBucketTaggingRequestWithDefaults() *PutBucketTaggingRequest {
+ this := PutBucketTaggingRequest{}
+ return &this
+}
+
+// GetTagSet returns the TagSet field value if set, zero value otherwise.
+func (o *PutBucketTaggingRequest) GetTagSet() []Tag {
+ if o == nil || IsNil(o.TagSet) {
+ var ret []Tag
+ return ret
+ }
+ return o.TagSet
+}
+
+// GetTagSetOk returns a tuple with the TagSet field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketTaggingRequest) GetTagSetOk() ([]Tag, bool) {
+ if o == nil || IsNil(o.TagSet) {
+ return nil, false
+ }
+ return o.TagSet, true
+}
+
+// HasTagSet returns a boolean if a field has been set.
+func (o *PutBucketTaggingRequest) HasTagSet() bool {
+ if o != nil && !IsNil(o.TagSet) {
+ return true
+ }
+
+ return false
+}
+
+// SetTagSet gets a reference to the given []Tag and assigns it to the TagSet field.
+func (o *PutBucketTaggingRequest) SetTagSet(v []Tag) {
+ o.TagSet = v
+}
+
+func (o PutBucketTaggingRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutBucketTaggingRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.TagSet) {
+ toSerialize["TagSet"] = o.TagSet
+ }
+ return toSerialize, nil
+}
+
+type NullablePutBucketTaggingRequest struct {
+ value *PutBucketTaggingRequest
+ isSet bool
+}
+
+func (v NullablePutBucketTaggingRequest) Get() *PutBucketTaggingRequest {
+ return v.value
+}
+
+func (v *NullablePutBucketTaggingRequest) Set(val *PutBucketTaggingRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutBucketTaggingRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutBucketTaggingRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutBucketTaggingRequest(val *PutBucketTaggingRequest) *NullablePutBucketTaggingRequest {
+ return &NullablePutBucketTaggingRequest{value: val, isSet: true}
+}
+
+func (v NullablePutBucketTaggingRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutBucketTaggingRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_versioning_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_versioning_request.go
new file mode 100644
index 0000000000..8f76f1931f
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_versioning_request.go
@@ -0,0 +1,165 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutBucketVersioningRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutBucketVersioningRequest{}
+
+// PutBucketVersioningRequest struct for PutBucketVersioningRequest
+type PutBucketVersioningRequest struct {
+ XMLName xml.Name `xml:"VersioningConfiguration"`
+ Status *BucketVersioningStatus `json:"Status,omitempty" xml:"Status"`
+ MfaDelete *MfaDeleteStatus `json:"MfaDelete,omitempty" xml:"MfaDelete"`
+}
+
+// NewPutBucketVersioningRequest instantiates a new PutBucketVersioningRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutBucketVersioningRequest() *PutBucketVersioningRequest {
+ this := PutBucketVersioningRequest{}
+
+ return &this
+}
+
+// NewPutBucketVersioningRequestWithDefaults instantiates a new PutBucketVersioningRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutBucketVersioningRequestWithDefaults() *PutBucketVersioningRequest {
+ this := PutBucketVersioningRequest{}
+ return &this
+}
+
+// GetStatus returns the Status field value if set, zero value otherwise.
+func (o *PutBucketVersioningRequest) GetStatus() BucketVersioningStatus {
+ if o == nil || IsNil(o.Status) {
+ var ret BucketVersioningStatus
+ return ret
+ }
+ return *o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketVersioningRequest) GetStatusOk() (*BucketVersioningStatus, bool) {
+ if o == nil || IsNil(o.Status) {
+ return nil, false
+ }
+ return o.Status, true
+}
+
+// HasStatus returns a boolean if a field has been set.
+func (o *PutBucketVersioningRequest) HasStatus() bool {
+ if o != nil && !IsNil(o.Status) {
+ return true
+ }
+
+ return false
+}
+
+// SetStatus gets a reference to the given BucketVersioningStatus and assigns it to the Status field.
+func (o *PutBucketVersioningRequest) SetStatus(v BucketVersioningStatus) {
+ o.Status = &v
+}
+
+// GetMfaDelete returns the MfaDelete field value if set, zero value otherwise.
+func (o *PutBucketVersioningRequest) GetMfaDelete() MfaDeleteStatus {
+ if o == nil || IsNil(o.MfaDelete) {
+ var ret MfaDeleteStatus
+ return ret
+ }
+ return *o.MfaDelete
+}
+
+// GetMfaDeleteOk returns a tuple with the MfaDelete field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketVersioningRequest) GetMfaDeleteOk() (*MfaDeleteStatus, bool) {
+ if o == nil || IsNil(o.MfaDelete) {
+ return nil, false
+ }
+ return o.MfaDelete, true
+}
+
+// HasMfaDelete returns a boolean if a field has been set.
+func (o *PutBucketVersioningRequest) HasMfaDelete() bool {
+ if o != nil && !IsNil(o.MfaDelete) {
+ return true
+ }
+
+ return false
+}
+
+// SetMfaDelete gets a reference to the given MfaDeleteStatus and assigns it to the MfaDelete field.
+func (o *PutBucketVersioningRequest) SetMfaDelete(v MfaDeleteStatus) {
+ o.MfaDelete = &v
+}
+
+func (o PutBucketVersioningRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutBucketVersioningRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Status) {
+ toSerialize["Status"] = o.Status
+ }
+ if !IsNil(o.MfaDelete) {
+ toSerialize["MfaDelete"] = o.MfaDelete
+ }
+ return toSerialize, nil
+}
+
+type NullablePutBucketVersioningRequest struct {
+ value *PutBucketVersioningRequest
+ isSet bool
+}
+
+func (v NullablePutBucketVersioningRequest) Get() *PutBucketVersioningRequest {
+ return v.value
+}
+
+func (v *NullablePutBucketVersioningRequest) Set(val *PutBucketVersioningRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutBucketVersioningRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutBucketVersioningRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutBucketVersioningRequest(val *PutBucketVersioningRequest) *NullablePutBucketVersioningRequest {
+ return &NullablePutBucketVersioningRequest{value: val, isSet: true}
+}
+
+func (v NullablePutBucketVersioningRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutBucketVersioningRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_website_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_website_request.go
new file mode 100644
index 0000000000..8af483adeb
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_bucket_website_request.go
@@ -0,0 +1,237 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutBucketWebsiteRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutBucketWebsiteRequest{}
+
+// PutBucketWebsiteRequest Specifies website configuration parameters for an IONOS Object Storage bucket.
+type PutBucketWebsiteRequest struct {
+ XMLName xml.Name `xml:"WebsiteConfiguration"`
+ ErrorDocument *ErrorDocument `json:"ErrorDocument,omitempty" xml:"ErrorDocument"`
+ IndexDocument *IndexDocument `json:"IndexDocument,omitempty" xml:"IndexDocument"`
+ RedirectAllRequestsTo *RedirectAllRequestsTo `json:"RedirectAllRequestsTo,omitempty" xml:"RedirectAllRequestsTo"`
+ RoutingRules []RoutingRule `json:"RoutingRules,omitempty" xml:"RoutingRules"`
+}
+
+// NewPutBucketWebsiteRequest instantiates a new PutBucketWebsiteRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutBucketWebsiteRequest() *PutBucketWebsiteRequest {
+ this := PutBucketWebsiteRequest{}
+
+ return &this
+}
+
+// NewPutBucketWebsiteRequestWithDefaults instantiates a new PutBucketWebsiteRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutBucketWebsiteRequestWithDefaults() *PutBucketWebsiteRequest {
+ this := PutBucketWebsiteRequest{}
+ return &this
+}
+
+// GetErrorDocument returns the ErrorDocument field value if set, zero value otherwise.
+func (o *PutBucketWebsiteRequest) GetErrorDocument() ErrorDocument {
+ if o == nil || IsNil(o.ErrorDocument) {
+ var ret ErrorDocument
+ return ret
+ }
+ return *o.ErrorDocument
+}
+
+// GetErrorDocumentOk returns a tuple with the ErrorDocument field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketWebsiteRequest) GetErrorDocumentOk() (*ErrorDocument, bool) {
+ if o == nil || IsNil(o.ErrorDocument) {
+ return nil, false
+ }
+ return o.ErrorDocument, true
+}
+
+// HasErrorDocument returns a boolean if a field has been set.
+func (o *PutBucketWebsiteRequest) HasErrorDocument() bool {
+ if o != nil && !IsNil(o.ErrorDocument) {
+ return true
+ }
+
+ return false
+}
+
+// SetErrorDocument gets a reference to the given ErrorDocument and assigns it to the ErrorDocument field.
+func (o *PutBucketWebsiteRequest) SetErrorDocument(v ErrorDocument) {
+ o.ErrorDocument = &v
+}
+
+// GetIndexDocument returns the IndexDocument field value if set, zero value otherwise.
+func (o *PutBucketWebsiteRequest) GetIndexDocument() IndexDocument {
+ if o == nil || IsNil(o.IndexDocument) {
+ var ret IndexDocument
+ return ret
+ }
+ return *o.IndexDocument
+}
+
+// GetIndexDocumentOk returns a tuple with the IndexDocument field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketWebsiteRequest) GetIndexDocumentOk() (*IndexDocument, bool) {
+ if o == nil || IsNil(o.IndexDocument) {
+ return nil, false
+ }
+ return o.IndexDocument, true
+}
+
+// HasIndexDocument returns a boolean if a field has been set.
+func (o *PutBucketWebsiteRequest) HasIndexDocument() bool {
+ if o != nil && !IsNil(o.IndexDocument) {
+ return true
+ }
+
+ return false
+}
+
+// SetIndexDocument gets a reference to the given IndexDocument and assigns it to the IndexDocument field.
+func (o *PutBucketWebsiteRequest) SetIndexDocument(v IndexDocument) {
+ o.IndexDocument = &v
+}
+
+// GetRedirectAllRequestsTo returns the RedirectAllRequestsTo field value if set, zero value otherwise.
+func (o *PutBucketWebsiteRequest) GetRedirectAllRequestsTo() RedirectAllRequestsTo {
+ if o == nil || IsNil(o.RedirectAllRequestsTo) {
+ var ret RedirectAllRequestsTo
+ return ret
+ }
+ return *o.RedirectAllRequestsTo
+}
+
+// GetRedirectAllRequestsToOk returns a tuple with the RedirectAllRequestsTo field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketWebsiteRequest) GetRedirectAllRequestsToOk() (*RedirectAllRequestsTo, bool) {
+ if o == nil || IsNil(o.RedirectAllRequestsTo) {
+ return nil, false
+ }
+ return o.RedirectAllRequestsTo, true
+}
+
+// HasRedirectAllRequestsTo returns a boolean if a field has been set.
+func (o *PutBucketWebsiteRequest) HasRedirectAllRequestsTo() bool {
+ if o != nil && !IsNil(o.RedirectAllRequestsTo) {
+ return true
+ }
+
+ return false
+}
+
+// SetRedirectAllRequestsTo gets a reference to the given RedirectAllRequestsTo and assigns it to the RedirectAllRequestsTo field.
+func (o *PutBucketWebsiteRequest) SetRedirectAllRequestsTo(v RedirectAllRequestsTo) {
+ o.RedirectAllRequestsTo = &v
+}
+
+// GetRoutingRules returns the RoutingRules field value if set, zero value otherwise.
+func (o *PutBucketWebsiteRequest) GetRoutingRules() []RoutingRule {
+ if o == nil || IsNil(o.RoutingRules) {
+ var ret []RoutingRule
+ return ret
+ }
+ return o.RoutingRules
+}
+
+// GetRoutingRulesOk returns a tuple with the RoutingRules field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutBucketWebsiteRequest) GetRoutingRulesOk() ([]RoutingRule, bool) {
+ if o == nil || IsNil(o.RoutingRules) {
+ return nil, false
+ }
+ return o.RoutingRules, true
+}
+
+// HasRoutingRules returns a boolean if a field has been set.
+func (o *PutBucketWebsiteRequest) HasRoutingRules() bool {
+ if o != nil && !IsNil(o.RoutingRules) {
+ return true
+ }
+
+ return false
+}
+
+// SetRoutingRules gets a reference to the given []RoutingRule and assigns it to the RoutingRules field.
+func (o *PutBucketWebsiteRequest) SetRoutingRules(v []RoutingRule) {
+ o.RoutingRules = v
+}
+
+func (o PutBucketWebsiteRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutBucketWebsiteRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ErrorDocument) {
+ toSerialize["ErrorDocument"] = o.ErrorDocument
+ }
+ if !IsNil(o.IndexDocument) {
+ toSerialize["IndexDocument"] = o.IndexDocument
+ }
+ if !IsNil(o.RedirectAllRequestsTo) {
+ toSerialize["RedirectAllRequestsTo"] = o.RedirectAllRequestsTo
+ }
+ if !IsNil(o.RoutingRules) {
+ toSerialize["RoutingRules"] = o.RoutingRules
+ }
+ return toSerialize, nil
+}
+
+type NullablePutBucketWebsiteRequest struct {
+ value *PutBucketWebsiteRequest
+ isSet bool
+}
+
+func (v NullablePutBucketWebsiteRequest) Get() *PutBucketWebsiteRequest {
+ return v.value
+}
+
+func (v *NullablePutBucketWebsiteRequest) Set(val *PutBucketWebsiteRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutBucketWebsiteRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutBucketWebsiteRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutBucketWebsiteRequest(val *PutBucketWebsiteRequest) *NullablePutBucketWebsiteRequest {
+ return &NullablePutBucketWebsiteRequest{value: val, isSet: true}
+}
+
+func (v NullablePutBucketWebsiteRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutBucketWebsiteRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_lock_configuration_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_lock_configuration_request.go
new file mode 100644
index 0000000000..78a7565a56
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_lock_configuration_request.go
@@ -0,0 +1,165 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutObjectLockConfigurationRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutObjectLockConfigurationRequest{}
+
+// PutObjectLockConfigurationRequest A container for an object lock configuration.
+type PutObjectLockConfigurationRequest struct {
+ XMLName xml.Name `xml:"ObjectLockConfiguration"`
+ ObjectLockEnabled *string `json:"ObjectLockEnabled,omitempty" xml:"ObjectLockEnabled"`
+ Rule *PutObjectLockConfigurationRequestRule `json:"Rule,omitempty" xml:"Rule"`
+}
+
+// NewPutObjectLockConfigurationRequest instantiates a new PutObjectLockConfigurationRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutObjectLockConfigurationRequest() *PutObjectLockConfigurationRequest {
+ this := PutObjectLockConfigurationRequest{}
+
+ return &this
+}
+
+// NewPutObjectLockConfigurationRequestWithDefaults instantiates a new PutObjectLockConfigurationRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutObjectLockConfigurationRequestWithDefaults() *PutObjectLockConfigurationRequest {
+ this := PutObjectLockConfigurationRequest{}
+ return &this
+}
+
+// GetObjectLockEnabled returns the ObjectLockEnabled field value if set, zero value otherwise.
+func (o *PutObjectLockConfigurationRequest) GetObjectLockEnabled() string {
+ if o == nil || IsNil(o.ObjectLockEnabled) {
+ var ret string
+ return ret
+ }
+ return *o.ObjectLockEnabled
+}
+
+// GetObjectLockEnabledOk returns a tuple with the ObjectLockEnabled field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutObjectLockConfigurationRequest) GetObjectLockEnabledOk() (*string, bool) {
+ if o == nil || IsNil(o.ObjectLockEnabled) {
+ return nil, false
+ }
+ return o.ObjectLockEnabled, true
+}
+
+// HasObjectLockEnabled returns a boolean if a field has been set.
+func (o *PutObjectLockConfigurationRequest) HasObjectLockEnabled() bool {
+ if o != nil && !IsNil(o.ObjectLockEnabled) {
+ return true
+ }
+
+ return false
+}
+
+// SetObjectLockEnabled gets a reference to the given string and assigns it to the ObjectLockEnabled field.
+func (o *PutObjectLockConfigurationRequest) SetObjectLockEnabled(v string) {
+ o.ObjectLockEnabled = &v
+}
+
+// GetRule returns the Rule field value if set, zero value otherwise.
+func (o *PutObjectLockConfigurationRequest) GetRule() PutObjectLockConfigurationRequestRule {
+ if o == nil || IsNil(o.Rule) {
+ var ret PutObjectLockConfigurationRequestRule
+ return ret
+ }
+ return *o.Rule
+}
+
+// GetRuleOk returns a tuple with the Rule field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutObjectLockConfigurationRequest) GetRuleOk() (*PutObjectLockConfigurationRequestRule, bool) {
+ if o == nil || IsNil(o.Rule) {
+ return nil, false
+ }
+ return o.Rule, true
+}
+
+// HasRule returns a boolean if a field has been set.
+func (o *PutObjectLockConfigurationRequest) HasRule() bool {
+ if o != nil && !IsNil(o.Rule) {
+ return true
+ }
+
+ return false
+}
+
+// SetRule gets a reference to the given PutObjectLockConfigurationRequestRule and assigns it to the Rule field.
+func (o *PutObjectLockConfigurationRequest) SetRule(v PutObjectLockConfigurationRequestRule) {
+ o.Rule = &v
+}
+
+func (o PutObjectLockConfigurationRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutObjectLockConfigurationRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ObjectLockEnabled) {
+ toSerialize["ObjectLockEnabled"] = o.ObjectLockEnabled
+ }
+ if !IsNil(o.Rule) {
+ toSerialize["Rule"] = o.Rule
+ }
+ return toSerialize, nil
+}
+
+type NullablePutObjectLockConfigurationRequest struct {
+ value *PutObjectLockConfigurationRequest
+ isSet bool
+}
+
+func (v NullablePutObjectLockConfigurationRequest) Get() *PutObjectLockConfigurationRequest {
+ return v.value
+}
+
+func (v *NullablePutObjectLockConfigurationRequest) Set(val *PutObjectLockConfigurationRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutObjectLockConfigurationRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutObjectLockConfigurationRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutObjectLockConfigurationRequest(val *PutObjectLockConfigurationRequest) *NullablePutObjectLockConfigurationRequest {
+ return &NullablePutObjectLockConfigurationRequest{value: val, isSet: true}
+}
+
+func (v NullablePutObjectLockConfigurationRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutObjectLockConfigurationRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_lock_configuration_request_rule.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_lock_configuration_request_rule.go
new file mode 100644
index 0000000000..7f1078dd04
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_lock_configuration_request_rule.go
@@ -0,0 +1,129 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutObjectLockConfigurationRequestRule type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutObjectLockConfigurationRequestRule{}
+
+// PutObjectLockConfigurationRequestRule Specifies Object Lock rule for the specified object. Enable this rule when you apply `ObjectLockConfiguration` to a bucket. Bucket settings require both a mode and a period. Specify the period either in `Days` or `Years`, and not both at the same time.
+type PutObjectLockConfigurationRequestRule struct {
+ XMLName xml.Name `xml:"Rule"`
+ DefaultRetention *DefaultRetention `json:"DefaultRetention,omitempty" xml:"DefaultRetention"`
+}
+
+// NewPutObjectLockConfigurationRequestRule instantiates a new PutObjectLockConfigurationRequestRule object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutObjectLockConfigurationRequestRule() *PutObjectLockConfigurationRequestRule {
+ this := PutObjectLockConfigurationRequestRule{}
+
+ return &this
+}
+
+// NewPutObjectLockConfigurationRequestRuleWithDefaults instantiates a new PutObjectLockConfigurationRequestRule object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutObjectLockConfigurationRequestRuleWithDefaults() *PutObjectLockConfigurationRequestRule {
+ this := PutObjectLockConfigurationRequestRule{}
+ return &this
+}
+
+// GetDefaultRetention returns the DefaultRetention field value if set, zero value otherwise.
+func (o *PutObjectLockConfigurationRequestRule) GetDefaultRetention() DefaultRetention {
+ if o == nil || IsNil(o.DefaultRetention) {
+ var ret DefaultRetention
+ return ret
+ }
+ return *o.DefaultRetention
+}
+
+// GetDefaultRetentionOk returns a tuple with the DefaultRetention field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutObjectLockConfigurationRequestRule) GetDefaultRetentionOk() (*DefaultRetention, bool) {
+ if o == nil || IsNil(o.DefaultRetention) {
+ return nil, false
+ }
+ return o.DefaultRetention, true
+}
+
+// HasDefaultRetention returns a boolean if a field has been set.
+func (o *PutObjectLockConfigurationRequestRule) HasDefaultRetention() bool {
+ if o != nil && !IsNil(o.DefaultRetention) {
+ return true
+ }
+
+ return false
+}
+
+// SetDefaultRetention gets a reference to the given DefaultRetention and assigns it to the DefaultRetention field.
+func (o *PutObjectLockConfigurationRequestRule) SetDefaultRetention(v DefaultRetention) {
+ o.DefaultRetention = &v
+}
+
+func (o PutObjectLockConfigurationRequestRule) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutObjectLockConfigurationRequestRule) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.DefaultRetention) {
+ toSerialize["DefaultRetention"] = o.DefaultRetention
+ }
+ return toSerialize, nil
+}
+
+type NullablePutObjectLockConfigurationRequestRule struct {
+ value *PutObjectLockConfigurationRequestRule
+ isSet bool
+}
+
+func (v NullablePutObjectLockConfigurationRequestRule) Get() *PutObjectLockConfigurationRequestRule {
+ return v.value
+}
+
+func (v *NullablePutObjectLockConfigurationRequestRule) Set(val *PutObjectLockConfigurationRequestRule) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutObjectLockConfigurationRequestRule) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutObjectLockConfigurationRequestRule) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutObjectLockConfigurationRequestRule(val *PutObjectLockConfigurationRequestRule) *NullablePutObjectLockConfigurationRequestRule {
+ return &NullablePutObjectLockConfigurationRequestRule{value: val, isSet: true}
+}
+
+func (v NullablePutObjectLockConfigurationRequestRule) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutObjectLockConfigurationRequestRule) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_retention_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_retention_request.go
new file mode 100644
index 0000000000..55a028c9c0
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_retention_request.go
@@ -0,0 +1,167 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutObjectRetentionRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutObjectRetentionRequest{}
+
+// PutObjectRetentionRequest A Retention configuration for an object.
+type PutObjectRetentionRequest struct {
+ XMLName xml.Name `xml:"Retention"`
+ // Indicates the Retention mode for the specified object.
+ Mode *string `json:"Mode,omitempty" xml:"Mode"`
+ // The date on which this Object Lock Retention will expire.
+ RetainUntilDate *string `json:"RetainUntilDate,omitempty" xml:"RetainUntilDate"`
+}
+
+// NewPutObjectRetentionRequest instantiates a new PutObjectRetentionRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutObjectRetentionRequest() *PutObjectRetentionRequest {
+ this := PutObjectRetentionRequest{}
+
+ return &this
+}
+
+// NewPutObjectRetentionRequestWithDefaults instantiates a new PutObjectRetentionRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutObjectRetentionRequestWithDefaults() *PutObjectRetentionRequest {
+ this := PutObjectRetentionRequest{}
+ return &this
+}
+
+// GetMode returns the Mode field value if set, zero value otherwise.
+func (o *PutObjectRetentionRequest) GetMode() string {
+ if o == nil || IsNil(o.Mode) {
+ var ret string
+ return ret
+ }
+ return *o.Mode
+}
+
+// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutObjectRetentionRequest) GetModeOk() (*string, bool) {
+ if o == nil || IsNil(o.Mode) {
+ return nil, false
+ }
+ return o.Mode, true
+}
+
+// HasMode returns a boolean if a field has been set.
+func (o *PutObjectRetentionRequest) HasMode() bool {
+ if o != nil && !IsNil(o.Mode) {
+ return true
+ }
+
+ return false
+}
+
+// SetMode gets a reference to the given string and assigns it to the Mode field.
+func (o *PutObjectRetentionRequest) SetMode(v string) {
+ o.Mode = &v
+}
+
+// GetRetainUntilDate returns the RetainUntilDate field value if set, zero value otherwise.
+func (o *PutObjectRetentionRequest) GetRetainUntilDate() string {
+ if o == nil || IsNil(o.RetainUntilDate) {
+ var ret string
+ return ret
+ }
+ return *o.RetainUntilDate
+}
+
+// GetRetainUntilDateOk returns a tuple with the RetainUntilDate field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutObjectRetentionRequest) GetRetainUntilDateOk() (*string, bool) {
+ if o == nil || IsNil(o.RetainUntilDate) {
+ return nil, false
+ }
+ return o.RetainUntilDate, true
+}
+
+// HasRetainUntilDate returns a boolean if a field has been set.
+func (o *PutObjectRetentionRequest) HasRetainUntilDate() bool {
+ if o != nil && !IsNil(o.RetainUntilDate) {
+ return true
+ }
+
+ return false
+}
+
+// SetRetainUntilDate gets a reference to the given string and assigns it to the RetainUntilDate field.
+func (o *PutObjectRetentionRequest) SetRetainUntilDate(v string) {
+ o.RetainUntilDate = &v
+}
+
+func (o PutObjectRetentionRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutObjectRetentionRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Mode) {
+ toSerialize["Mode"] = o.Mode
+ }
+ if !IsNil(o.RetainUntilDate) {
+ toSerialize["RetainUntilDate"] = o.RetainUntilDate
+ }
+ return toSerialize, nil
+}
+
+type NullablePutObjectRetentionRequest struct {
+ value *PutObjectRetentionRequest
+ isSet bool
+}
+
+func (v NullablePutObjectRetentionRequest) Get() *PutObjectRetentionRequest {
+ return v.value
+}
+
+func (v *NullablePutObjectRetentionRequest) Set(val *PutObjectRetentionRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutObjectRetentionRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutObjectRetentionRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutObjectRetentionRequest(val *PutObjectRetentionRequest) *NullablePutObjectRetentionRequest {
+ return &NullablePutObjectRetentionRequest{value: val, isSet: true}
+}
+
+func (v NullablePutObjectRetentionRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutObjectRetentionRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_tagging_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_tagging_request.go
new file mode 100644
index 0000000000..eb3058fcab
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_put_object_tagging_request.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the PutObjectTaggingRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &PutObjectTaggingRequest{}
+
+// PutObjectTaggingRequest Container for `TagSet` elements.
+type PutObjectTaggingRequest struct {
+ XMLName xml.Name `xml:"Tagging"`
+ // Contains the tag set.
+ TagSet []Tag `json:"TagSet,omitempty" xml:"TagSet>Tag"`
+}
+
+// NewPutObjectTaggingRequest instantiates a new PutObjectTaggingRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewPutObjectTaggingRequest() *PutObjectTaggingRequest {
+ this := PutObjectTaggingRequest{}
+
+ return &this
+}
+
+// NewPutObjectTaggingRequestWithDefaults instantiates a new PutObjectTaggingRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewPutObjectTaggingRequestWithDefaults() *PutObjectTaggingRequest {
+ this := PutObjectTaggingRequest{}
+ return &this
+}
+
+// GetTagSet returns the TagSet field value if set, zero value otherwise.
+func (o *PutObjectTaggingRequest) GetTagSet() []Tag {
+ if o == nil || IsNil(o.TagSet) {
+ var ret []Tag
+ return ret
+ }
+ return o.TagSet
+}
+
+// GetTagSetOk returns a tuple with the TagSet field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *PutObjectTaggingRequest) GetTagSetOk() ([]Tag, bool) {
+ if o == nil || IsNil(o.TagSet) {
+ return nil, false
+ }
+ return o.TagSet, true
+}
+
+// HasTagSet returns a boolean if a field has been set.
+func (o *PutObjectTaggingRequest) HasTagSet() bool {
+ if o != nil && !IsNil(o.TagSet) {
+ return true
+ }
+
+ return false
+}
+
+// SetTagSet gets a reference to the given []Tag and assigns it to the TagSet field.
+func (o *PutObjectTaggingRequest) SetTagSet(v []Tag) {
+ o.TagSet = v
+}
+
+func (o PutObjectTaggingRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o PutObjectTaggingRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.TagSet) {
+ toSerialize["TagSet"] = o.TagSet
+ }
+ return toSerialize, nil
+}
+
+type NullablePutObjectTaggingRequest struct {
+ value *PutObjectTaggingRequest
+ isSet bool
+}
+
+func (v NullablePutObjectTaggingRequest) Get() *PutObjectTaggingRequest {
+ return v.value
+}
+
+func (v *NullablePutObjectTaggingRequest) Set(val *PutObjectTaggingRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullablePutObjectTaggingRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullablePutObjectTaggingRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullablePutObjectTaggingRequest(val *PutObjectTaggingRequest) *NullablePutObjectTaggingRequest {
+ return &NullablePutObjectTaggingRequest{value: val, isSet: true}
+}
+
+func (v NullablePutObjectTaggingRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullablePutObjectTaggingRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_redirect.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_redirect.go
new file mode 100644
index 0000000000..ef100505d7
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_redirect.go
@@ -0,0 +1,278 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Redirect type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Redirect{}
+
+// Redirect Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.
+type Redirect struct {
+ XMLName xml.Name `xml:"Redirect"`
+ // The host name to use in the redirect request.
+ HostName *string `json:"HostName,omitempty" xml:"HostName"`
+ // The HTTP redirect code to use on the response. Not required if one of the siblings is present.
+ HttpRedirectCode *string `json:"HttpRedirectCode,omitempty" xml:"HttpRedirectCode"`
+ // Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
+ Protocol *string `json:"Protocol,omitempty" xml:"Protocol"`
+ // The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix `docs/` (objects in the `docs/` folder) to `documents/`, you can set a condition block with `KeyPrefixEquals` set to `docs/` and in the Redirect set `ReplaceKeyPrefixWith` to `/documents`. Not required if one of the siblings is present. Can be present only if `ReplaceKeyWith` is not provided.
Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ ReplaceKeyPrefixWith *string `json:"ReplaceKeyPrefixWith,omitempty" xml:"ReplaceKeyPrefixWith"`
+ // The specific object key to use in the redirect request. For example, redirect request to `error.html`. Not required if one of the siblings is present. Can be present only if `ReplaceKeyPrefixWith` is not provided. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ ReplaceKeyWith *string `json:"ReplaceKeyWith,omitempty" xml:"ReplaceKeyWith"`
+}
+
+// NewRedirect instantiates a new Redirect object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRedirect() *Redirect {
+ this := Redirect{}
+
+ return &this
+}
+
+// NewRedirectWithDefaults instantiates a new Redirect object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRedirectWithDefaults() *Redirect {
+ this := Redirect{}
+ return &this
+}
+
+// GetHostName returns the HostName field value if set, zero value otherwise.
+func (o *Redirect) GetHostName() string {
+ if o == nil || IsNil(o.HostName) {
+ var ret string
+ return ret
+ }
+ return *o.HostName
+}
+
+// GetHostNameOk returns a tuple with the HostName field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Redirect) GetHostNameOk() (*string, bool) {
+ if o == nil || IsNil(o.HostName) {
+ return nil, false
+ }
+ return o.HostName, true
+}
+
+// HasHostName returns a boolean if a field has been set.
+func (o *Redirect) HasHostName() bool {
+ if o != nil && !IsNil(o.HostName) {
+ return true
+ }
+
+ return false
+}
+
+// SetHostName gets a reference to the given string and assigns it to the HostName field.
+func (o *Redirect) SetHostName(v string) {
+ o.HostName = &v
+}
+
+// GetHttpRedirectCode returns the HttpRedirectCode field value if set, zero value otherwise.
+func (o *Redirect) GetHttpRedirectCode() string {
+ if o == nil || IsNil(o.HttpRedirectCode) {
+ var ret string
+ return ret
+ }
+ return *o.HttpRedirectCode
+}
+
+// GetHttpRedirectCodeOk returns a tuple with the HttpRedirectCode field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Redirect) GetHttpRedirectCodeOk() (*string, bool) {
+ if o == nil || IsNil(o.HttpRedirectCode) {
+ return nil, false
+ }
+ return o.HttpRedirectCode, true
+}
+
+// HasHttpRedirectCode returns a boolean if a field has been set.
+func (o *Redirect) HasHttpRedirectCode() bool {
+ if o != nil && !IsNil(o.HttpRedirectCode) {
+ return true
+ }
+
+ return false
+}
+
+// SetHttpRedirectCode gets a reference to the given string and assigns it to the HttpRedirectCode field.
+func (o *Redirect) SetHttpRedirectCode(v string) {
+ o.HttpRedirectCode = &v
+}
+
+// GetProtocol returns the Protocol field value if set, zero value otherwise.
+func (o *Redirect) GetProtocol() string {
+ if o == nil || IsNil(o.Protocol) {
+ var ret string
+ return ret
+ }
+ return *o.Protocol
+}
+
+// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Redirect) GetProtocolOk() (*string, bool) {
+ if o == nil || IsNil(o.Protocol) {
+ return nil, false
+ }
+ return o.Protocol, true
+}
+
+// HasProtocol returns a boolean if a field has been set.
+func (o *Redirect) HasProtocol() bool {
+ if o != nil && !IsNil(o.Protocol) {
+ return true
+ }
+
+ return false
+}
+
+// SetProtocol gets a reference to the given string and assigns it to the Protocol field.
+func (o *Redirect) SetProtocol(v string) {
+ o.Protocol = &v
+}
+
+// GetReplaceKeyPrefixWith returns the ReplaceKeyPrefixWith field value if set, zero value otherwise.
+func (o *Redirect) GetReplaceKeyPrefixWith() string {
+ if o == nil || IsNil(o.ReplaceKeyPrefixWith) {
+ var ret string
+ return ret
+ }
+ return *o.ReplaceKeyPrefixWith
+}
+
+// GetReplaceKeyPrefixWithOk returns a tuple with the ReplaceKeyPrefixWith field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Redirect) GetReplaceKeyPrefixWithOk() (*string, bool) {
+ if o == nil || IsNil(o.ReplaceKeyPrefixWith) {
+ return nil, false
+ }
+ return o.ReplaceKeyPrefixWith, true
+}
+
+// HasReplaceKeyPrefixWith returns a boolean if a field has been set.
+func (o *Redirect) HasReplaceKeyPrefixWith() bool {
+ if o != nil && !IsNil(o.ReplaceKeyPrefixWith) {
+ return true
+ }
+
+ return false
+}
+
+// SetReplaceKeyPrefixWith gets a reference to the given string and assigns it to the ReplaceKeyPrefixWith field.
+func (o *Redirect) SetReplaceKeyPrefixWith(v string) {
+ o.ReplaceKeyPrefixWith = &v
+}
+
+// GetReplaceKeyWith returns the ReplaceKeyWith field value if set, zero value otherwise.
+func (o *Redirect) GetReplaceKeyWith() string {
+ if o == nil || IsNil(o.ReplaceKeyWith) {
+ var ret string
+ return ret
+ }
+ return *o.ReplaceKeyWith
+}
+
+// GetReplaceKeyWithOk returns a tuple with the ReplaceKeyWith field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Redirect) GetReplaceKeyWithOk() (*string, bool) {
+ if o == nil || IsNil(o.ReplaceKeyWith) {
+ return nil, false
+ }
+ return o.ReplaceKeyWith, true
+}
+
+// HasReplaceKeyWith returns a boolean if a field has been set.
+func (o *Redirect) HasReplaceKeyWith() bool {
+ if o != nil && !IsNil(o.ReplaceKeyWith) {
+ return true
+ }
+
+ return false
+}
+
+// SetReplaceKeyWith gets a reference to the given string and assigns it to the ReplaceKeyWith field.
+func (o *Redirect) SetReplaceKeyWith(v string) {
+ o.ReplaceKeyWith = &v
+}
+
+func (o Redirect) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Redirect) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.HostName) {
+ toSerialize["HostName"] = o.HostName
+ }
+ if !IsNil(o.HttpRedirectCode) {
+ toSerialize["HttpRedirectCode"] = o.HttpRedirectCode
+ }
+ if !IsNil(o.Protocol) {
+ toSerialize["Protocol"] = o.Protocol
+ }
+ if !IsNil(o.ReplaceKeyPrefixWith) {
+ toSerialize["ReplaceKeyPrefixWith"] = o.ReplaceKeyPrefixWith
+ }
+ if !IsNil(o.ReplaceKeyWith) {
+ toSerialize["ReplaceKeyWith"] = o.ReplaceKeyWith
+ }
+ return toSerialize, nil
+}
+
+type NullableRedirect struct {
+ value *Redirect
+ isSet bool
+}
+
+func (v NullableRedirect) Get() *Redirect {
+ return v.value
+}
+
+func (v *NullableRedirect) Set(val *Redirect) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRedirect) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRedirect) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRedirect(val *Redirect) *NullableRedirect {
+ return &NullableRedirect{value: val, isSet: true}
+}
+
+func (v NullableRedirect) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRedirect) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_redirect_all_requests_to.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_redirect_all_requests_to.go
new file mode 100644
index 0000000000..bba019c7f7
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_redirect_all_requests_to.go
@@ -0,0 +1,159 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the RedirectAllRequestsTo type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &RedirectAllRequestsTo{}
+
+// RedirectAllRequestsTo Specifies the redirect behavior of all requests to a website endpoint of an IONOS Object Storage bucket.
+type RedirectAllRequestsTo struct {
+ XMLName xml.Name `xml:"RedirectAllRequestsTo"`
+ // Name of the host where requests are redirected.
+ HostName string `json:"HostName" xml:"HostName"`
+ // Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
+ Protocol *string `json:"Protocol,omitempty" xml:"Protocol"`
+}
+
+// NewRedirectAllRequestsTo instantiates a new RedirectAllRequestsTo object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRedirectAllRequestsTo(hostName string) *RedirectAllRequestsTo {
+ this := RedirectAllRequestsTo{}
+
+ this.HostName = hostName
+
+ return &this
+}
+
+// NewRedirectAllRequestsToWithDefaults instantiates a new RedirectAllRequestsTo object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRedirectAllRequestsToWithDefaults() *RedirectAllRequestsTo {
+ this := RedirectAllRequestsTo{}
+ return &this
+}
+
+// GetHostName returns the HostName field value
+func (o *RedirectAllRequestsTo) GetHostName() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.HostName
+}
+
+// GetHostNameOk returns a tuple with the HostName field value
+// and a boolean to check if the value has been set.
+func (o *RedirectAllRequestsTo) GetHostNameOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.HostName, true
+}
+
+// SetHostName sets field value
+func (o *RedirectAllRequestsTo) SetHostName(v string) {
+ o.HostName = v
+}
+
+// GetProtocol returns the Protocol field value if set, zero value otherwise.
+func (o *RedirectAllRequestsTo) GetProtocol() string {
+ if o == nil || IsNil(o.Protocol) {
+ var ret string
+ return ret
+ }
+ return *o.Protocol
+}
+
+// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RedirectAllRequestsTo) GetProtocolOk() (*string, bool) {
+ if o == nil || IsNil(o.Protocol) {
+ return nil, false
+ }
+ return o.Protocol, true
+}
+
+// HasProtocol returns a boolean if a field has been set.
+func (o *RedirectAllRequestsTo) HasProtocol() bool {
+ if o != nil && !IsNil(o.Protocol) {
+ return true
+ }
+
+ return false
+}
+
+// SetProtocol gets a reference to the given string and assigns it to the Protocol field.
+func (o *RedirectAllRequestsTo) SetProtocol(v string) {
+ o.Protocol = &v
+}
+
+func (o RedirectAllRequestsTo) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o RedirectAllRequestsTo) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["HostName"] = o.HostName
+ if !IsNil(o.Protocol) {
+ toSerialize["Protocol"] = o.Protocol
+ }
+ return toSerialize, nil
+}
+
+type NullableRedirectAllRequestsTo struct {
+ value *RedirectAllRequestsTo
+ isSet bool
+}
+
+func (v NullableRedirectAllRequestsTo) Get() *RedirectAllRequestsTo {
+ return v.value
+}
+
+func (v *NullableRedirectAllRequestsTo) Set(val *RedirectAllRequestsTo) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRedirectAllRequestsTo) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRedirectAllRequestsTo) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRedirectAllRequestsTo(val *RedirectAllRequestsTo) *NullableRedirectAllRequestsTo {
+ return &NullableRedirectAllRequestsTo{value: val, isSet: true}
+}
+
+func (v NullableRedirectAllRequestsTo) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRedirectAllRequestsTo) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replica_modifications_status.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replica_modifications_status.go
new file mode 100644
index 0000000000..54390feec8
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replica_modifications_status.go
@@ -0,0 +1,84 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ReplicaModificationsStatus the model 'ReplicaModificationsStatus'
+type ReplicaModificationsStatus string
+
+// List of ReplicaModificationsStatus
+const (
+ REPLICAMODIFICATIONSSTATUS_ENABLED ReplicaModificationsStatus = "Enabled"
+ REPLICAMODIFICATIONSSTATUS_DISABLED ReplicaModificationsStatus = "Disabled"
+)
+
+func (v *ReplicaModificationsStatus) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ReplicaModificationsStatus(value)
+ for _, existing := range []ReplicaModificationsStatus{"Enabled", "Disabled"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ReplicaModificationsStatus", value)
+}
+
+// Ptr returns reference to ReplicaModificationsStatus value
+func (v ReplicaModificationsStatus) Ptr() *ReplicaModificationsStatus {
+ return &v
+}
+
+type NullableReplicaModificationsStatus struct {
+ value *ReplicaModificationsStatus
+ isSet bool
+}
+
+func (v NullableReplicaModificationsStatus) Get() *ReplicaModificationsStatus {
+ return v.value
+}
+
+func (v *NullableReplicaModificationsStatus) Set(val *ReplicaModificationsStatus) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableReplicaModificationsStatus) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableReplicaModificationsStatus) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableReplicaModificationsStatus(val *ReplicaModificationsStatus) *NullableReplicaModificationsStatus {
+ return &NullableReplicaModificationsStatus{value: val, isSet: true}
+}
+
+func (v NullableReplicaModificationsStatus) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableReplicaModificationsStatus) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replication_configuration.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replication_configuration.go
new file mode 100644
index 0000000000..08ca93e2b6
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replication_configuration.go
@@ -0,0 +1,149 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ReplicationConfiguration type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ReplicationConfiguration{}
+
+// ReplicationConfiguration A container for replication rules. You can add up to 1,000 rules. The maximum size of a replication configuration is 2 MB.
+type ReplicationConfiguration struct {
+ XMLName xml.Name `xml:"ReplicationConfiguration"`
+ // The Resource Name of the Identity and Access Management (IAM) role that IONOS Object Storage assumes when replicating objects.
+ Role string `json:"Role" xml:"Role"`
+ Rules []ReplicationRule `json:"Rules" xml:"Rules"`
+}
+
+// NewReplicationConfiguration instantiates a new ReplicationConfiguration object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewReplicationConfiguration(role string, rules []ReplicationRule) *ReplicationConfiguration {
+ this := ReplicationConfiguration{}
+
+ this.Role = role
+ this.Rules = rules
+
+ return &this
+}
+
+// NewReplicationConfigurationWithDefaults instantiates a new ReplicationConfiguration object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewReplicationConfigurationWithDefaults() *ReplicationConfiguration {
+ this := ReplicationConfiguration{}
+ return &this
+}
+
+// GetRole returns the Role field value
+func (o *ReplicationConfiguration) GetRole() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Role
+}
+
+// GetRoleOk returns a tuple with the Role field value
+// and a boolean to check if the value has been set.
+func (o *ReplicationConfiguration) GetRoleOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Role, true
+}
+
+// SetRole sets field value
+func (o *ReplicationConfiguration) SetRole(v string) {
+ o.Role = v
+}
+
+// GetRules returns the Rules field value
+func (o *ReplicationConfiguration) GetRules() []ReplicationRule {
+ if o == nil {
+ var ret []ReplicationRule
+ return ret
+ }
+
+ return o.Rules
+}
+
+// GetRulesOk returns a tuple with the Rules field value
+// and a boolean to check if the value has been set.
+func (o *ReplicationConfiguration) GetRulesOk() ([]ReplicationRule, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.Rules, true
+}
+
+// SetRules sets field value
+func (o *ReplicationConfiguration) SetRules(v []ReplicationRule) {
+ o.Rules = v
+}
+
+func (o ReplicationConfiguration) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ReplicationConfiguration) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Role"] = o.Role
+ toSerialize["Rules"] = o.Rules
+ return toSerialize, nil
+}
+
+type NullableReplicationConfiguration struct {
+ value *ReplicationConfiguration
+ isSet bool
+}
+
+func (v NullableReplicationConfiguration) Get() *ReplicationConfiguration {
+ return v.value
+}
+
+func (v *NullableReplicationConfiguration) Set(val *ReplicationConfiguration) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableReplicationConfiguration) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableReplicationConfiguration) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableReplicationConfiguration(val *ReplicationConfiguration) *NullableReplicationConfiguration {
+ return &NullableReplicationConfiguration{value: val, isSet: true}
+}
+
+func (v NullableReplicationConfiguration) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableReplicationConfiguration) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replication_rule.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replication_rule.go
new file mode 100644
index 0000000000..399101d8fe
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_replication_rule.go
@@ -0,0 +1,223 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ReplicationRule type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ReplicationRule{}
+
+// ReplicationRule Specifies which IONOS Object Storage objects to replicate and where to store the replicas.
+type ReplicationRule struct {
+ XMLName xml.Name `xml:"ReplicationRule"`
+ // Container for the Contract Number of the owner.
+ ID *int32 `json:"ID,omitempty" xml:"ID"`
+ // An object key name prefix that identifies the subset of objects to which the rule applies. Replace the Object keys containing special characters, such as carriage returns, when using XML requests.
+ Prefix *string `json:"Prefix,omitempty" xml:"Prefix"`
+ // Specifies whether the rule is enabled.
+ Status string `json:"Status" xml:"Status"`
+ Destination Destination `json:"Destination" xml:"Destination"`
+}
+
+// NewReplicationRule instantiates a new ReplicationRule object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewReplicationRule(status string, destination Destination) *ReplicationRule {
+ this := ReplicationRule{}
+
+ this.Status = status
+ this.Destination = destination
+
+ return &this
+}
+
+// NewReplicationRuleWithDefaults instantiates a new ReplicationRule object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewReplicationRuleWithDefaults() *ReplicationRule {
+ this := ReplicationRule{}
+ return &this
+}
+
+// GetID returns the ID field value if set, zero value otherwise.
+func (o *ReplicationRule) GetID() int32 {
+ if o == nil || IsNil(o.ID) {
+ var ret int32
+ return ret
+ }
+ return *o.ID
+}
+
+// GetIDOk returns a tuple with the ID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ReplicationRule) GetIDOk() (*int32, bool) {
+ if o == nil || IsNil(o.ID) {
+ return nil, false
+ }
+ return o.ID, true
+}
+
+// HasID returns a boolean if a field has been set.
+func (o *ReplicationRule) HasID() bool {
+ if o != nil && !IsNil(o.ID) {
+ return true
+ }
+
+ return false
+}
+
+// SetID gets a reference to the given int32 and assigns it to the ID field.
+func (o *ReplicationRule) SetID(v int32) {
+ o.ID = &v
+}
+
+// GetPrefix returns the Prefix field value if set, zero value otherwise.
+func (o *ReplicationRule) GetPrefix() string {
+ if o == nil || IsNil(o.Prefix) {
+ var ret string
+ return ret
+ }
+ return *o.Prefix
+}
+
+// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ReplicationRule) GetPrefixOk() (*string, bool) {
+ if o == nil || IsNil(o.Prefix) {
+ return nil, false
+ }
+ return o.Prefix, true
+}
+
+// HasPrefix returns a boolean if a field has been set.
+func (o *ReplicationRule) HasPrefix() bool {
+ if o != nil && !IsNil(o.Prefix) {
+ return true
+ }
+
+ return false
+}
+
+// SetPrefix gets a reference to the given string and assigns it to the Prefix field.
+func (o *ReplicationRule) SetPrefix(v string) {
+ o.Prefix = &v
+}
+
+// GetStatus returns the Status field value
+func (o *ReplicationRule) GetStatus() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value
+// and a boolean to check if the value has been set.
+func (o *ReplicationRule) GetStatusOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Status, true
+}
+
+// SetStatus sets field value
+func (o *ReplicationRule) SetStatus(v string) {
+ o.Status = v
+}
+
+// GetDestination returns the Destination field value
+func (o *ReplicationRule) GetDestination() Destination {
+ if o == nil {
+ var ret Destination
+ return ret
+ }
+
+ return o.Destination
+}
+
+// GetDestinationOk returns a tuple with the Destination field value
+// and a boolean to check if the value has been set.
+func (o *ReplicationRule) GetDestinationOk() (*Destination, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Destination, true
+}
+
+// SetDestination sets field value
+func (o *ReplicationRule) SetDestination(v Destination) {
+ o.Destination = v
+}
+
+func (o ReplicationRule) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ReplicationRule) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ID) {
+ toSerialize["ID"] = o.ID
+ }
+ if !IsNil(o.Prefix) {
+ toSerialize["Prefix"] = o.Prefix
+ }
+ toSerialize["Status"] = o.Status
+ toSerialize["Destination"] = o.Destination
+ return toSerialize, nil
+}
+
+type NullableReplicationRule struct {
+ value *ReplicationRule
+ isSet bool
+}
+
+func (v NullableReplicationRule) Get() *ReplicationRule {
+ return v.value
+}
+
+func (v *NullableReplicationRule) Set(val *ReplicationRule) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableReplicationRule) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableReplicationRule) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableReplicationRule(val *ReplicationRule) *NullableReplicationRule {
+ return &NullableReplicationRule{value: val, isSet: true}
+}
+
+func (v NullableReplicationRule) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableReplicationRule) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_routing_rule.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_routing_rule.go
new file mode 100644
index 0000000000..e0018e16cf
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_routing_rule.go
@@ -0,0 +1,157 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the RoutingRule type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &RoutingRule{}
+
+// RoutingRule Specifies the redirect behavior and when a redirect is applied.
+type RoutingRule struct {
+ XMLName xml.Name `xml:"RoutingRule"`
+ Condition *RoutingRuleCondition `json:"Condition,omitempty" xml:"Condition"`
+ Redirect Redirect `json:"Redirect" xml:"Redirect"`
+}
+
+// NewRoutingRule instantiates a new RoutingRule object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRoutingRule(redirect Redirect) *RoutingRule {
+ this := RoutingRule{}
+
+ this.Redirect = redirect
+
+ return &this
+}
+
+// NewRoutingRuleWithDefaults instantiates a new RoutingRule object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRoutingRuleWithDefaults() *RoutingRule {
+ this := RoutingRule{}
+ return &this
+}
+
+// GetCondition returns the Condition field value if set, zero value otherwise.
+func (o *RoutingRule) GetCondition() RoutingRuleCondition {
+ if o == nil || IsNil(o.Condition) {
+ var ret RoutingRuleCondition
+ return ret
+ }
+ return *o.Condition
+}
+
+// GetConditionOk returns a tuple with the Condition field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RoutingRule) GetConditionOk() (*RoutingRuleCondition, bool) {
+ if o == nil || IsNil(o.Condition) {
+ return nil, false
+ }
+ return o.Condition, true
+}
+
+// HasCondition returns a boolean if a field has been set.
+func (o *RoutingRule) HasCondition() bool {
+ if o != nil && !IsNil(o.Condition) {
+ return true
+ }
+
+ return false
+}
+
+// SetCondition gets a reference to the given RoutingRuleCondition and assigns it to the Condition field.
+func (o *RoutingRule) SetCondition(v RoutingRuleCondition) {
+ o.Condition = &v
+}
+
+// GetRedirect returns the Redirect field value
+func (o *RoutingRule) GetRedirect() Redirect {
+ if o == nil {
+ var ret Redirect
+ return ret
+ }
+
+ return o.Redirect
+}
+
+// GetRedirectOk returns a tuple with the Redirect field value
+// and a boolean to check if the value has been set.
+func (o *RoutingRule) GetRedirectOk() (*Redirect, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Redirect, true
+}
+
+// SetRedirect sets field value
+func (o *RoutingRule) SetRedirect(v Redirect) {
+ o.Redirect = v
+}
+
+func (o RoutingRule) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o RoutingRule) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Condition) {
+ toSerialize["Condition"] = o.Condition
+ }
+ toSerialize["Redirect"] = o.Redirect
+ return toSerialize, nil
+}
+
+type NullableRoutingRule struct {
+ value *RoutingRule
+ isSet bool
+}
+
+func (v NullableRoutingRule) Get() *RoutingRule {
+ return v.value
+}
+
+func (v *NullableRoutingRule) Set(val *RoutingRule) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRoutingRule) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRoutingRule) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRoutingRule(val *RoutingRule) *NullableRoutingRule {
+ return &NullableRoutingRule{value: val, isSet: true}
+}
+
+func (v NullableRoutingRule) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRoutingRule) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_routing_rule_condition.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_routing_rule_condition.go
new file mode 100644
index 0000000000..9c2fd0f21e
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_routing_rule_condition.go
@@ -0,0 +1,167 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the RoutingRuleCondition type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &RoutingRuleCondition{}
+
+// RoutingRuleCondition A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the `/docs` folder, redirect to the `/documents` folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.
+type RoutingRuleCondition struct {
+ XMLName xml.Name `xml:"Condition"`
+ // The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this value, then the specified redirect is applied. Required when parent element `Condition` is specified and sibling `KeyPrefixEquals` is not specified. If both are specified, then both must be true for the redirect to be applied.
+ HttpErrorCodeReturnedEquals *string `json:"HttpErrorCodeReturnedEquals,omitempty" xml:"HttpErrorCodeReturnedEquals"`
+ // The object key name prefix when the redirect is applied. For example, to redirect requests for `ExamplePage.html`, the key prefix will be `ExamplePage.html`. To redirect request for all pages with the prefix `docs/`, the key prefix will be `/docs`, which identifies all objects in the `docs/` folder. Required when the parent element `Condition` is specified and sibling `HttpErrorCodeReturnedEquals` is not specified. If both conditions are specified, both must be true for the redirect to be applied.
Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ KeyPrefixEquals *string `json:"KeyPrefixEquals,omitempty" xml:"KeyPrefixEquals"`
+}
+
+// NewRoutingRuleCondition instantiates a new RoutingRuleCondition object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRoutingRuleCondition() *RoutingRuleCondition {
+ this := RoutingRuleCondition{}
+
+ return &this
+}
+
+// NewRoutingRuleConditionWithDefaults instantiates a new RoutingRuleCondition object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRoutingRuleConditionWithDefaults() *RoutingRuleCondition {
+ this := RoutingRuleCondition{}
+ return &this
+}
+
+// GetHttpErrorCodeReturnedEquals returns the HttpErrorCodeReturnedEquals field value if set, zero value otherwise.
+func (o *RoutingRuleCondition) GetHttpErrorCodeReturnedEquals() string {
+ if o == nil || IsNil(o.HttpErrorCodeReturnedEquals) {
+ var ret string
+ return ret
+ }
+ return *o.HttpErrorCodeReturnedEquals
+}
+
+// GetHttpErrorCodeReturnedEqualsOk returns a tuple with the HttpErrorCodeReturnedEquals field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RoutingRuleCondition) GetHttpErrorCodeReturnedEqualsOk() (*string, bool) {
+ if o == nil || IsNil(o.HttpErrorCodeReturnedEquals) {
+ return nil, false
+ }
+ return o.HttpErrorCodeReturnedEquals, true
+}
+
+// HasHttpErrorCodeReturnedEquals returns a boolean if a field has been set.
+func (o *RoutingRuleCondition) HasHttpErrorCodeReturnedEquals() bool {
+ if o != nil && !IsNil(o.HttpErrorCodeReturnedEquals) {
+ return true
+ }
+
+ return false
+}
+
+// SetHttpErrorCodeReturnedEquals gets a reference to the given string and assigns it to the HttpErrorCodeReturnedEquals field.
+func (o *RoutingRuleCondition) SetHttpErrorCodeReturnedEquals(v string) {
+ o.HttpErrorCodeReturnedEquals = &v
+}
+
+// GetKeyPrefixEquals returns the KeyPrefixEquals field value if set, zero value otherwise.
+func (o *RoutingRuleCondition) GetKeyPrefixEquals() string {
+ if o == nil || IsNil(o.KeyPrefixEquals) {
+ var ret string
+ return ret
+ }
+ return *o.KeyPrefixEquals
+}
+
+// GetKeyPrefixEqualsOk returns a tuple with the KeyPrefixEquals field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *RoutingRuleCondition) GetKeyPrefixEqualsOk() (*string, bool) {
+ if o == nil || IsNil(o.KeyPrefixEquals) {
+ return nil, false
+ }
+ return o.KeyPrefixEquals, true
+}
+
+// HasKeyPrefixEquals returns a boolean if a field has been set.
+func (o *RoutingRuleCondition) HasKeyPrefixEquals() bool {
+ if o != nil && !IsNil(o.KeyPrefixEquals) {
+ return true
+ }
+
+ return false
+}
+
+// SetKeyPrefixEquals gets a reference to the given string and assigns it to the KeyPrefixEquals field.
+func (o *RoutingRuleCondition) SetKeyPrefixEquals(v string) {
+ o.KeyPrefixEquals = &v
+}
+
+func (o RoutingRuleCondition) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o RoutingRuleCondition) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.HttpErrorCodeReturnedEquals) {
+ toSerialize["HttpErrorCodeReturnedEquals"] = o.HttpErrorCodeReturnedEquals
+ }
+ if !IsNil(o.KeyPrefixEquals) {
+ toSerialize["KeyPrefixEquals"] = o.KeyPrefixEquals
+ }
+ return toSerialize, nil
+}
+
+type NullableRoutingRuleCondition struct {
+ value *RoutingRuleCondition
+ isSet bool
+}
+
+func (v NullableRoutingRuleCondition) Get() *RoutingRuleCondition {
+ return v.value
+}
+
+func (v *NullableRoutingRuleCondition) Set(val *RoutingRuleCondition) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRoutingRuleCondition) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRoutingRuleCondition) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRoutingRuleCondition(val *RoutingRuleCondition) *NullableRoutingRuleCondition {
+ return &NullableRoutingRuleCondition{value: val, isSet: true}
+}
+
+func (v NullableRoutingRuleCondition) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRoutingRuleCondition) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_rule.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_rule.go
new file mode 100644
index 0000000000..e7df95c515
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_rule.go
@@ -0,0 +1,330 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Rule type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Rule{}
+
+// Rule Specifies lifecycle rules for an IONOS Object Storage bucket.
+type Rule struct {
+ XMLName xml.Name `xml:"Rule"`
+ // Unique identifier for the rule. The value can't be longer than 255 characters.
+ ID *string `json:"ID,omitempty" xml:"ID"`
+ // Object key prefix that identifies one or more objects to which this rule applies. Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests.
+ Prefix string `json:"Prefix" xml:"Prefix"`
+ Filter *Filter `json:"Filter,omitempty" xml:"Filter"`
+ Status ExpirationStatus `json:"Status" xml:"Status"`
+ Expiration *LifecycleExpiration `json:"Expiration,omitempty" xml:"Expiration"`
+ NoncurrentVersionExpiration *NoncurrentVersionExpiration `json:"NoncurrentVersionExpiration,omitempty" xml:"NoncurrentVersionExpiration"`
+ AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `json:"AbortIncompleteMultipartUpload,omitempty" xml:"AbortIncompleteMultipartUpload"`
+}
+
+// NewRule instantiates a new Rule object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewRule(prefix string, status ExpirationStatus) *Rule {
+ this := Rule{}
+
+ this.Prefix = prefix
+ this.Status = status
+
+ return &this
+}
+
+// NewRuleWithDefaults instantiates a new Rule object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewRuleWithDefaults() *Rule {
+ this := Rule{}
+ return &this
+}
+
+// GetID returns the ID field value if set, zero value otherwise.
+func (o *Rule) GetID() string {
+ if o == nil || IsNil(o.ID) {
+ var ret string
+ return ret
+ }
+ return *o.ID
+}
+
+// GetIDOk returns a tuple with the ID field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Rule) GetIDOk() (*string, bool) {
+ if o == nil || IsNil(o.ID) {
+ return nil, false
+ }
+ return o.ID, true
+}
+
+// HasID returns a boolean if a field has been set.
+func (o *Rule) HasID() bool {
+ if o != nil && !IsNil(o.ID) {
+ return true
+ }
+
+ return false
+}
+
+// SetID gets a reference to the given string and assigns it to the ID field.
+func (o *Rule) SetID(v string) {
+ o.ID = &v
+}
+
+// GetPrefix returns the Prefix field value
+func (o *Rule) GetPrefix() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Prefix
+}
+
+// GetPrefixOk returns a tuple with the Prefix field value
+// and a boolean to check if the value has been set.
+func (o *Rule) GetPrefixOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Prefix, true
+}
+
+// SetPrefix sets field value
+func (o *Rule) SetPrefix(v string) {
+ o.Prefix = v
+}
+
+// GetFilter returns the Filter field value if set, zero value otherwise.
+func (o *Rule) GetFilter() Filter {
+ if o == nil || IsNil(o.Filter) {
+ var ret Filter
+ return ret
+ }
+ return *o.Filter
+}
+
+// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Rule) GetFilterOk() (*Filter, bool) {
+ if o == nil || IsNil(o.Filter) {
+ return nil, false
+ }
+ return o.Filter, true
+}
+
+// HasFilter returns a boolean if a field has been set.
+func (o *Rule) HasFilter() bool {
+ if o != nil && !IsNil(o.Filter) {
+ return true
+ }
+
+ return false
+}
+
+// SetFilter gets a reference to the given Filter and assigns it to the Filter field.
+func (o *Rule) SetFilter(v Filter) {
+ o.Filter = &v
+}
+
+// GetStatus returns the Status field value
+func (o *Rule) GetStatus() ExpirationStatus {
+ if o == nil {
+ var ret ExpirationStatus
+ return ret
+ }
+
+ return o.Status
+}
+
+// GetStatusOk returns a tuple with the Status field value
+// and a boolean to check if the value has been set.
+func (o *Rule) GetStatusOk() (*ExpirationStatus, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Status, true
+}
+
+// SetStatus sets field value
+func (o *Rule) SetStatus(v ExpirationStatus) {
+ o.Status = v
+}
+
+// GetExpiration returns the Expiration field value if set, zero value otherwise.
+func (o *Rule) GetExpiration() LifecycleExpiration {
+ if o == nil || IsNil(o.Expiration) {
+ var ret LifecycleExpiration
+ return ret
+ }
+ return *o.Expiration
+}
+
+// GetExpirationOk returns a tuple with the Expiration field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Rule) GetExpirationOk() (*LifecycleExpiration, bool) {
+ if o == nil || IsNil(o.Expiration) {
+ return nil, false
+ }
+ return o.Expiration, true
+}
+
+// HasExpiration returns a boolean if a field has been set.
+func (o *Rule) HasExpiration() bool {
+ if o != nil && !IsNil(o.Expiration) {
+ return true
+ }
+
+ return false
+}
+
+// SetExpiration gets a reference to the given LifecycleExpiration and assigns it to the Expiration field.
+func (o *Rule) SetExpiration(v LifecycleExpiration) {
+ o.Expiration = &v
+}
+
+// GetNoncurrentVersionExpiration returns the NoncurrentVersionExpiration field value if set, zero value otherwise.
+func (o *Rule) GetNoncurrentVersionExpiration() NoncurrentVersionExpiration {
+ if o == nil || IsNil(o.NoncurrentVersionExpiration) {
+ var ret NoncurrentVersionExpiration
+ return ret
+ }
+ return *o.NoncurrentVersionExpiration
+}
+
+// GetNoncurrentVersionExpirationOk returns a tuple with the NoncurrentVersionExpiration field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Rule) GetNoncurrentVersionExpirationOk() (*NoncurrentVersionExpiration, bool) {
+ if o == nil || IsNil(o.NoncurrentVersionExpiration) {
+ return nil, false
+ }
+ return o.NoncurrentVersionExpiration, true
+}
+
+// HasNoncurrentVersionExpiration returns a boolean if a field has been set.
+func (o *Rule) HasNoncurrentVersionExpiration() bool {
+ if o != nil && !IsNil(o.NoncurrentVersionExpiration) {
+ return true
+ }
+
+ return false
+}
+
+// SetNoncurrentVersionExpiration gets a reference to the given NoncurrentVersionExpiration and assigns it to the NoncurrentVersionExpiration field.
+func (o *Rule) SetNoncurrentVersionExpiration(v NoncurrentVersionExpiration) {
+ o.NoncurrentVersionExpiration = &v
+}
+
+// GetAbortIncompleteMultipartUpload returns the AbortIncompleteMultipartUpload field value if set, zero value otherwise.
+func (o *Rule) GetAbortIncompleteMultipartUpload() AbortIncompleteMultipartUpload {
+ if o == nil || IsNil(o.AbortIncompleteMultipartUpload) {
+ var ret AbortIncompleteMultipartUpload
+ return ret
+ }
+ return *o.AbortIncompleteMultipartUpload
+}
+
+// GetAbortIncompleteMultipartUploadOk returns a tuple with the AbortIncompleteMultipartUpload field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *Rule) GetAbortIncompleteMultipartUploadOk() (*AbortIncompleteMultipartUpload, bool) {
+ if o == nil || IsNil(o.AbortIncompleteMultipartUpload) {
+ return nil, false
+ }
+ return o.AbortIncompleteMultipartUpload, true
+}
+
+// HasAbortIncompleteMultipartUpload returns a boolean if a field has been set.
+func (o *Rule) HasAbortIncompleteMultipartUpload() bool {
+ if o != nil && !IsNil(o.AbortIncompleteMultipartUpload) {
+ return true
+ }
+
+ return false
+}
+
+// SetAbortIncompleteMultipartUpload gets a reference to the given AbortIncompleteMultipartUpload and assigns it to the AbortIncompleteMultipartUpload field.
+func (o *Rule) SetAbortIncompleteMultipartUpload(v AbortIncompleteMultipartUpload) {
+ o.AbortIncompleteMultipartUpload = &v
+}
+
+func (o Rule) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Rule) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ID) {
+ toSerialize["ID"] = o.ID
+ }
+ toSerialize["Prefix"] = o.Prefix
+ if !IsNil(o.Filter) {
+ toSerialize["Filter"] = o.Filter
+ }
+ toSerialize["Status"] = o.Status
+ if !IsNil(o.Expiration) {
+ toSerialize["Expiration"] = o.Expiration
+ }
+ if !IsNil(o.NoncurrentVersionExpiration) {
+ toSerialize["NoncurrentVersionExpiration"] = o.NoncurrentVersionExpiration
+ }
+ if !IsNil(o.AbortIncompleteMultipartUpload) {
+ toSerialize["AbortIncompleteMultipartUpload"] = o.AbortIncompleteMultipartUpload
+ }
+ return toSerialize, nil
+}
+
+type NullableRule struct {
+ value *Rule
+ isSet bool
+}
+
+func (v NullableRule) Get() *Rule {
+ return v.value
+}
+
+func (v *NullableRule) Set(val *Rule) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableRule) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableRule) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableRule(val *Rule) *NullableRule {
+ return &NullableRule{value: val, isSet: true}
+}
+
+func (v NullableRule) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableRule) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption.go
new file mode 100644
index 0000000000..2a5f64f6cb
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption.go
@@ -0,0 +1,83 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// ServerSideEncryption Server-side encryption algorithm for the default encryption. The valid value is `AES256`.
+type ServerSideEncryption string
+
+// List of ServerSideEncryption
+const (
+ SERVERSIDEENCRYPTION_AES256 ServerSideEncryption = "AES256"
+)
+
+func (v *ServerSideEncryption) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := ServerSideEncryption(value)
+ for _, existing := range []ServerSideEncryption{"AES256"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid ServerSideEncryption", value)
+}
+
+// Ptr returns reference to ServerSideEncryption value
+func (v ServerSideEncryption) Ptr() *ServerSideEncryption {
+ return &v
+}
+
+type NullableServerSideEncryption struct {
+ value *ServerSideEncryption
+ isSet bool
+}
+
+func (v NullableServerSideEncryption) Get() *ServerSideEncryption {
+ return v.value
+}
+
+func (v *NullableServerSideEncryption) Set(val *ServerSideEncryption) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServerSideEncryption) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServerSideEncryption) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServerSideEncryption(val *ServerSideEncryption) *NullableServerSideEncryption {
+ return &NullableServerSideEncryption{value: val, isSet: true}
+}
+
+func (v NullableServerSideEncryption) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServerSideEncryption) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_by_default.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_by_default.go
new file mode 100644
index 0000000000..9b4db99354
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_by_default.go
@@ -0,0 +1,121 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ServerSideEncryptionByDefault type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServerSideEncryptionByDefault{}
+
+// ServerSideEncryptionByDefault Describes the default server-side encryption to apply to new objects in the bucket. If a PUT Object request doesn't specify any server-side encryption, this default encryption will be applied.
+type ServerSideEncryptionByDefault struct {
+ XMLName xml.Name `xml:"ApplyServerSideEncryptionByDefault"`
+ SSEAlgorithm ServerSideEncryption `json:"SSEAlgorithm" xml:"SSEAlgorithm"`
+}
+
+// NewServerSideEncryptionByDefault instantiates a new ServerSideEncryptionByDefault object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServerSideEncryptionByDefault(sSEAlgorithm ServerSideEncryption) *ServerSideEncryptionByDefault {
+ this := ServerSideEncryptionByDefault{}
+
+ this.SSEAlgorithm = sSEAlgorithm
+
+ return &this
+}
+
+// NewServerSideEncryptionByDefaultWithDefaults instantiates a new ServerSideEncryptionByDefault object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServerSideEncryptionByDefaultWithDefaults() *ServerSideEncryptionByDefault {
+ this := ServerSideEncryptionByDefault{}
+ return &this
+}
+
+// GetSSEAlgorithm returns the SSEAlgorithm field value
+func (o *ServerSideEncryptionByDefault) GetSSEAlgorithm() ServerSideEncryption {
+ if o == nil {
+ var ret ServerSideEncryption
+ return ret
+ }
+
+ return o.SSEAlgorithm
+}
+
+// GetSSEAlgorithmOk returns a tuple with the SSEAlgorithm field value
+// and a boolean to check if the value has been set.
+func (o *ServerSideEncryptionByDefault) GetSSEAlgorithmOk() (*ServerSideEncryption, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.SSEAlgorithm, true
+}
+
+// SetSSEAlgorithm sets field value
+func (o *ServerSideEncryptionByDefault) SetSSEAlgorithm(v ServerSideEncryption) {
+ o.SSEAlgorithm = v
+}
+
+func (o ServerSideEncryptionByDefault) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServerSideEncryptionByDefault) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["SSEAlgorithm"] = o.SSEAlgorithm
+ return toSerialize, nil
+}
+
+type NullableServerSideEncryptionByDefault struct {
+ value *ServerSideEncryptionByDefault
+ isSet bool
+}
+
+func (v NullableServerSideEncryptionByDefault) Get() *ServerSideEncryptionByDefault {
+ return v.value
+}
+
+func (v *NullableServerSideEncryptionByDefault) Set(val *ServerSideEncryptionByDefault) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServerSideEncryptionByDefault) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServerSideEncryptionByDefault) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServerSideEncryptionByDefault(val *ServerSideEncryptionByDefault) *NullableServerSideEncryptionByDefault {
+ return &NullableServerSideEncryptionByDefault{value: val, isSet: true}
+}
+
+func (v NullableServerSideEncryptionByDefault) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServerSideEncryptionByDefault) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_configuration.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_configuration.go
new file mode 100644
index 0000000000..e2bbc0514c
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_configuration.go
@@ -0,0 +1,121 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ServerSideEncryptionConfiguration type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServerSideEncryptionConfiguration{}
+
+// ServerSideEncryptionConfiguration Specifies the default server-side-encryption configuration.
+type ServerSideEncryptionConfiguration struct {
+ XMLName xml.Name `xml:"ServerSideEncryptionConfiguration"`
+ Rules []ServerSideEncryptionRule `json:"Rules" xml:"Rule"`
+}
+
+// NewServerSideEncryptionConfiguration instantiates a new ServerSideEncryptionConfiguration object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServerSideEncryptionConfiguration(rules []ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
+ this := ServerSideEncryptionConfiguration{}
+
+ this.Rules = rules
+
+ return &this
+}
+
+// NewServerSideEncryptionConfigurationWithDefaults instantiates a new ServerSideEncryptionConfiguration object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServerSideEncryptionConfigurationWithDefaults() *ServerSideEncryptionConfiguration {
+ this := ServerSideEncryptionConfiguration{}
+ return &this
+}
+
+// GetRules returns the Rules field value
+func (o *ServerSideEncryptionConfiguration) GetRules() []ServerSideEncryptionRule {
+ if o == nil {
+ var ret []ServerSideEncryptionRule
+ return ret
+ }
+
+ return o.Rules
+}
+
+// GetRulesOk returns a tuple with the Rules field value
+// and a boolean to check if the value has been set.
+func (o *ServerSideEncryptionConfiguration) GetRulesOk() ([]ServerSideEncryptionRule, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return o.Rules, true
+}
+
+// SetRules sets field value
+func (o *ServerSideEncryptionConfiguration) SetRules(v []ServerSideEncryptionRule) {
+ o.Rules = v
+}
+
+func (o ServerSideEncryptionConfiguration) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServerSideEncryptionConfiguration) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Rules"] = o.Rules
+ return toSerialize, nil
+}
+
+type NullableServerSideEncryptionConfiguration struct {
+ value *ServerSideEncryptionConfiguration
+ isSet bool
+}
+
+func (v NullableServerSideEncryptionConfiguration) Get() *ServerSideEncryptionConfiguration {
+ return v.value
+}
+
+func (v *NullableServerSideEncryptionConfiguration) Set(val *ServerSideEncryptionConfiguration) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServerSideEncryptionConfiguration) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServerSideEncryptionConfiguration) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServerSideEncryptionConfiguration(val *ServerSideEncryptionConfiguration) *NullableServerSideEncryptionConfiguration {
+ return &NullableServerSideEncryptionConfiguration{value: val, isSet: true}
+}
+
+func (v NullableServerSideEncryptionConfiguration) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServerSideEncryptionConfiguration) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_rule.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_rule.go
new file mode 100644
index 0000000000..5d9cd3dd9d
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_server_side_encryption_rule.go
@@ -0,0 +1,129 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the ServerSideEncryptionRule type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &ServerSideEncryptionRule{}
+
+// ServerSideEncryptionRule Specifies the default server-side encryption configuration.
+type ServerSideEncryptionRule struct {
+ XMLName xml.Name `xml:"Rule"`
+ ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `json:"ApplyServerSideEncryptionByDefault,omitempty" xml:"ApplyServerSideEncryptionByDefault"`
+}
+
+// NewServerSideEncryptionRule instantiates a new ServerSideEncryptionRule object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewServerSideEncryptionRule() *ServerSideEncryptionRule {
+ this := ServerSideEncryptionRule{}
+
+ return &this
+}
+
+// NewServerSideEncryptionRuleWithDefaults instantiates a new ServerSideEncryptionRule object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewServerSideEncryptionRuleWithDefaults() *ServerSideEncryptionRule {
+ this := ServerSideEncryptionRule{}
+ return &this
+}
+
+// GetApplyServerSideEncryptionByDefault returns the ApplyServerSideEncryptionByDefault field value if set, zero value otherwise.
+func (o *ServerSideEncryptionRule) GetApplyServerSideEncryptionByDefault() ServerSideEncryptionByDefault {
+ if o == nil || IsNil(o.ApplyServerSideEncryptionByDefault) {
+ var ret ServerSideEncryptionByDefault
+ return ret
+ }
+ return *o.ApplyServerSideEncryptionByDefault
+}
+
+// GetApplyServerSideEncryptionByDefaultOk returns a tuple with the ApplyServerSideEncryptionByDefault field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *ServerSideEncryptionRule) GetApplyServerSideEncryptionByDefaultOk() (*ServerSideEncryptionByDefault, bool) {
+ if o == nil || IsNil(o.ApplyServerSideEncryptionByDefault) {
+ return nil, false
+ }
+ return o.ApplyServerSideEncryptionByDefault, true
+}
+
+// HasApplyServerSideEncryptionByDefault returns a boolean if a field has been set.
+func (o *ServerSideEncryptionRule) HasApplyServerSideEncryptionByDefault() bool {
+ if o != nil && !IsNil(o.ApplyServerSideEncryptionByDefault) {
+ return true
+ }
+
+ return false
+}
+
+// SetApplyServerSideEncryptionByDefault gets a reference to the given ServerSideEncryptionByDefault and assigns it to the ApplyServerSideEncryptionByDefault field.
+func (o *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v ServerSideEncryptionByDefault) {
+ o.ApplyServerSideEncryptionByDefault = &v
+}
+
+func (o ServerSideEncryptionRule) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o ServerSideEncryptionRule) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.ApplyServerSideEncryptionByDefault) {
+ toSerialize["ApplyServerSideEncryptionByDefault"] = o.ApplyServerSideEncryptionByDefault
+ }
+ return toSerialize, nil
+}
+
+type NullableServerSideEncryptionRule struct {
+ value *ServerSideEncryptionRule
+ isSet bool
+}
+
+func (v NullableServerSideEncryptionRule) Get() *ServerSideEncryptionRule {
+ return v.value
+}
+
+func (v *NullableServerSideEncryptionRule) Set(val *ServerSideEncryptionRule) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableServerSideEncryptionRule) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableServerSideEncryptionRule) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableServerSideEncryptionRule(val *ServerSideEncryptionRule) *NullableServerSideEncryptionRule {
+ return &NullableServerSideEncryptionRule{value: val, isSet: true}
+}
+
+func (v NullableServerSideEncryptionRule) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableServerSideEncryptionRule) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_storage_class.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_storage_class.go
new file mode 100644
index 0000000000..407918ca4d
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_storage_class.go
@@ -0,0 +1,83 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+ "fmt"
+)
+
+// StorageClass Currently, only one storage class is available – `STANDARD`.
+type StorageClass string
+
+// List of StorageClass
+const (
+ STORAGECLASS_STANDARD StorageClass = "STANDARD"
+)
+
+func (v *StorageClass) UnmarshalJSON(src []byte) error {
+ var value string
+ err := json.Unmarshal(src, &value)
+ if err != nil {
+ return err
+ }
+ enumTypeValue := StorageClass(value)
+ for _, existing := range []StorageClass{"STANDARD"} {
+ if existing == enumTypeValue {
+ *v = enumTypeValue
+ return nil
+ }
+ }
+
+ return fmt.Errorf("%+v is not a valid StorageClass", value)
+}
+
+// Ptr returns reference to StorageClass value
+func (v StorageClass) Ptr() *StorageClass {
+ return &v
+}
+
+type NullableStorageClass struct {
+ value *StorageClass
+ isSet bool
+}
+
+func (v NullableStorageClass) Get() *StorageClass {
+ return v.value
+}
+
+func (v *NullableStorageClass) Set(val *StorageClass) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableStorageClass) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableStorageClass) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableStorageClass(val *StorageClass) *NullableStorageClass {
+ return &NullableStorageClass{value: val, isSet: true}
+}
+
+func (v NullableStorageClass) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableStorageClass) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_tag.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_tag.go
new file mode 100644
index 0000000000..dbcc2d386c
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_tag.go
@@ -0,0 +1,150 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the Tag type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &Tag{}
+
+// Tag A container of a key value name pair.
+type Tag struct {
+ XMLName xml.Name `xml:"Tag"`
+ // The object key.
+ Key string `json:"Key" xml:"Key"`
+ // Value of the tag.
+ Value string `json:"Value" xml:"Value"`
+}
+
+// NewTag instantiates a new Tag object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewTag(key string, value string) *Tag {
+ this := Tag{}
+
+ this.Key = key
+ this.Value = value
+
+ return &this
+}
+
+// NewTagWithDefaults instantiates a new Tag object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewTagWithDefaults() *Tag {
+ this := Tag{}
+ return &this
+}
+
+// GetKey returns the Key field value
+func (o *Tag) GetKey() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Key
+}
+
+// GetKeyOk returns a tuple with the Key field value
+// and a boolean to check if the value has been set.
+func (o *Tag) GetKeyOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Key, true
+}
+
+// SetKey sets field value
+func (o *Tag) SetKey(v string) {
+ o.Key = v
+}
+
+// GetValue returns the Value field value
+func (o *Tag) GetValue() string {
+ if o == nil {
+ var ret string
+ return ret
+ }
+
+ return o.Value
+}
+
+// GetValueOk returns a tuple with the Value field value
+// and a boolean to check if the value has been set.
+func (o *Tag) GetValueOk() (*string, bool) {
+ if o == nil {
+ return nil, false
+ }
+ return &o.Value, true
+}
+
+// SetValue sets field value
+func (o *Tag) SetValue(v string) {
+ o.Value = v
+}
+
+func (o Tag) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o Tag) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ toSerialize["Key"] = o.Key
+ toSerialize["Value"] = o.Value
+ return toSerialize, nil
+}
+
+type NullableTag struct {
+ value *Tag
+ isSet bool
+}
+
+func (v NullableTag) Get() *Tag {
+ return v.value
+}
+
+func (v *NullableTag) Set(val *Tag) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableTag) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableTag) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableTag(val *Tag) *NullableTag {
+ return &NullableTag{value: val, isSet: true}
+}
+
+func (v NullableTag) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableTag) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_upload_part_copy_output.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_upload_part_copy_output.go
new file mode 100644
index 0000000000..3101ea8202
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_upload_part_copy_output.go
@@ -0,0 +1,129 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the UploadPartCopyOutput type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &UploadPartCopyOutput{}
+
+// UploadPartCopyOutput struct for UploadPartCopyOutput
+type UploadPartCopyOutput struct {
+ XMLName xml.Name `xml:"UploadPartCopyOutput"`
+ CopyPartResult *CopyPartResult `json:"CopyPartResult,omitempty" xml:"CopyPartResult"`
+}
+
+// NewUploadPartCopyOutput instantiates a new UploadPartCopyOutput object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewUploadPartCopyOutput() *UploadPartCopyOutput {
+ this := UploadPartCopyOutput{}
+
+ return &this
+}
+
+// NewUploadPartCopyOutputWithDefaults instantiates a new UploadPartCopyOutput object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewUploadPartCopyOutputWithDefaults() *UploadPartCopyOutput {
+ this := UploadPartCopyOutput{}
+ return &this
+}
+
+// GetCopyPartResult returns the CopyPartResult field value if set, zero value otherwise.
+func (o *UploadPartCopyOutput) GetCopyPartResult() CopyPartResult {
+ if o == nil || IsNil(o.CopyPartResult) {
+ var ret CopyPartResult
+ return ret
+ }
+ return *o.CopyPartResult
+}
+
+// GetCopyPartResultOk returns a tuple with the CopyPartResult field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UploadPartCopyOutput) GetCopyPartResultOk() (*CopyPartResult, bool) {
+ if o == nil || IsNil(o.CopyPartResult) {
+ return nil, false
+ }
+ return o.CopyPartResult, true
+}
+
+// HasCopyPartResult returns a boolean if a field has been set.
+func (o *UploadPartCopyOutput) HasCopyPartResult() bool {
+ if o != nil && !IsNil(o.CopyPartResult) {
+ return true
+ }
+
+ return false
+}
+
+// SetCopyPartResult gets a reference to the given CopyPartResult and assigns it to the CopyPartResult field.
+func (o *UploadPartCopyOutput) SetCopyPartResult(v CopyPartResult) {
+ o.CopyPartResult = &v
+}
+
+func (o UploadPartCopyOutput) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o UploadPartCopyOutput) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.CopyPartResult) {
+ toSerialize["CopyPartResult"] = o.CopyPartResult
+ }
+ return toSerialize, nil
+}
+
+type NullableUploadPartCopyOutput struct {
+ value *UploadPartCopyOutput
+ isSet bool
+}
+
+func (v NullableUploadPartCopyOutput) Get() *UploadPartCopyOutput {
+ return v.value
+}
+
+func (v *NullableUploadPartCopyOutput) Set(val *UploadPartCopyOutput) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableUploadPartCopyOutput) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableUploadPartCopyOutput) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableUploadPartCopyOutput(val *UploadPartCopyOutput) *NullableUploadPartCopyOutput {
+ return &NullableUploadPartCopyOutput{value: val, isSet: true}
+}
+
+func (v NullableUploadPartCopyOutput) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableUploadPartCopyOutput) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_upload_part_request.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_upload_part_request.go
new file mode 100644
index 0000000000..072c47c0a0
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/model_upload_part_request.go
@@ -0,0 +1,130 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "encoding/json"
+)
+
+import "encoding/xml"
+
+// checks if the UploadPartRequest type satisfies the MappedNullable interface at compile time
+var _ MappedNullable = &UploadPartRequest{}
+
+// UploadPartRequest struct for UploadPartRequest
+type UploadPartRequest struct {
+ XMLName xml.Name `xml:"UploadPartRequest"`
+ // Object data.
+ Body *string `json:"Body,omitempty" xml:"Body"`
+}
+
+// NewUploadPartRequest instantiates a new UploadPartRequest object
+// This constructor will assign default values to properties that have it defined,
+// and makes sure properties required by API are set, but the set of arguments
+// will change when the set of required properties is changed
+func NewUploadPartRequest() *UploadPartRequest {
+ this := UploadPartRequest{}
+
+ return &this
+}
+
+// NewUploadPartRequestWithDefaults instantiates a new UploadPartRequest object
+// This constructor will only assign default values to properties that have it defined,
+// but it doesn't guarantee that properties required by API are set
+func NewUploadPartRequestWithDefaults() *UploadPartRequest {
+ this := UploadPartRequest{}
+ return &this
+}
+
+// GetBody returns the Body field value if set, zero value otherwise.
+func (o *UploadPartRequest) GetBody() string {
+ if o == nil || IsNil(o.Body) {
+ var ret string
+ return ret
+ }
+ return *o.Body
+}
+
+// GetBodyOk returns a tuple with the Body field value if set, nil otherwise
+// and a boolean to check if the value has been set.
+func (o *UploadPartRequest) GetBodyOk() (*string, bool) {
+ if o == nil || IsNil(o.Body) {
+ return nil, false
+ }
+ return o.Body, true
+}
+
+// HasBody returns a boolean if a field has been set.
+func (o *UploadPartRequest) HasBody() bool {
+ if o != nil && !IsNil(o.Body) {
+ return true
+ }
+
+ return false
+}
+
+// SetBody gets a reference to the given string and assigns it to the Body field.
+func (o *UploadPartRequest) SetBody(v string) {
+ o.Body = &v
+}
+
+func (o UploadPartRequest) MarshalJSON() ([]byte, error) {
+ toSerialize, err := o.ToMap()
+ if err != nil {
+ return []byte{}, err
+ }
+ return json.Marshal(toSerialize)
+}
+
+func (o UploadPartRequest) ToMap() (map[string]interface{}, error) {
+ toSerialize := map[string]interface{}{}
+ if !IsNil(o.Body) {
+ toSerialize["Body"] = o.Body
+ }
+ return toSerialize, nil
+}
+
+type NullableUploadPartRequest struct {
+ value *UploadPartRequest
+ isSet bool
+}
+
+func (v NullableUploadPartRequest) Get() *UploadPartRequest {
+ return v.value
+}
+
+func (v *NullableUploadPartRequest) Set(val *UploadPartRequest) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableUploadPartRequest) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableUploadPartRequest) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableUploadPartRequest(val *UploadPartRequest) *NullableUploadPartRequest {
+ return &NullableUploadPartRequest{value: val, isSet: true}
+}
+
+func (v NullableUploadPartRequest) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableUploadPartRequest) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
diff --git a/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/utils.go b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/utils.go
new file mode 100644
index 0000000000..88b7cd6262
--- /dev/null
+++ b/vendor/github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2/utils.go
@@ -0,0 +1,377 @@
+/*
+ * IONOS Object Storage API for contract-owned buckets
+ *
+ * ## Overview The IONOS Object Storage API for contract-owned buckets is a REST-based API that allows developers and applications to interact directly with IONOS' scalable storage solution, leveraging the S3 protocol for object storage operations. Its design ensures seamless compatibility with existing tools and libraries tailored for S3 systems. ### API References - [S3 API Reference for contract-owned buckets](https://api.ionos.com/docs/s3-contract-owned-buckets/v2/) ### User documentation [IONOS Object Storage User Guide](https://docs.ionos.com/cloud/managed-services/s3-object-storage) * [Documentation on user-owned and contract-owned buckets](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/buckets) * [Documentation on S3 API Compatibility](https://docs.ionos.com/cloud/managed-services/s3-object-storage/concepts/s3-api-compatibility) * [S3 Tools](https://docs.ionos.com/cloud/managed-services/s3-object-storage/s3-tools) ## Endpoints for contract-owned buckets | Location | Region Name | Bucket Type | Endpoint | | --- | --- | --- | --- | | **Berlin, Germany** | **eu-central-3** | Contract-owned | `https://s3.eu-central-3.ionoscloud.com` | ## Changelog - 30.05.2024 Initial version
+ *
+ * API version: 2.0.2
+ * Contact: support@cloud.ionos.com
+ */
+
+// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
+
+package objectstorage
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "github.com/ionos-cloud/sdk-go-bundle/shared"
+ "reflect"
+ "strings"
+ "time"
+)
+
+type IonosTime struct {
+ time.Time
+}
+
+type NullableIonosTime struct {
+ NullableTime
+}
+
+func (t *IonosTime) UnmarshalJSON(data []byte) error {
+ str := string(data)
+ if shared.Strlen(str) == 0 {
+ t = nil
+ return nil
+ }
+ if str[0] == '"' {
+ str = str[1:]
+ }
+ if str[len(str)-1] == '"' {
+ str = str[:len(str)-1]
+ }
+ if !strings.Contains(str, "Z") {
+ /* forcefully adding timezone suffix to be able to parse the
+ * string using RFC3339 */
+ str += "Z"
+ }
+ tt, err := time.Parse(time.RFC3339, str)
+ if err != nil {
+ return err
+ }
+ *t = IonosTime{tt}
+ return nil
+}
+
+type NullableBool struct {
+ value *bool
+ isSet bool
+}
+
+func (v NullableBool) Get() *bool {
+ return v.value
+}
+
+func (v *NullableBool) Set(val *bool) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableBool) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableBool) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableBool(val *bool) *NullableBool {
+ return &NullableBool{value: val, isSet: true}
+}
+
+func (v NullableBool) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableBool) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt struct {
+ value *int
+ isSet bool
+}
+
+func (v NullableInt) Get() *int {
+ return v.value
+}
+
+func (v *NullableInt) Set(val *int) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt(val *int) *NullableInt {
+ return &NullableInt{value: val, isSet: true}
+}
+
+func (v NullableInt) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt32 struct {
+ value *int32
+ isSet bool
+}
+
+func (v NullableInt32) Get() *int32 {
+ return v.value
+}
+
+func (v *NullableInt32) Set(val *int32) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt32) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt32) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt32(val *int32) *NullableInt32 {
+ return &NullableInt32{value: val, isSet: true}
+}
+
+func (v NullableInt32) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt32) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableInt64 struct {
+ value *int64
+ isSet bool
+}
+
+func (v NullableInt64) Get() *int64 {
+ return v.value
+}
+
+func (v *NullableInt64) Set(val *int64) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableInt64) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableInt64) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableInt64(val *int64) *NullableInt64 {
+ return &NullableInt64{value: val, isSet: true}
+}
+
+func (v NullableInt64) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableInt64) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableFloat32 struct {
+ value *float32
+ isSet bool
+}
+
+func (v NullableFloat32) Get() *float32 {
+ return v.value
+}
+
+func (v *NullableFloat32) Set(val *float32) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableFloat32) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableFloat32) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableFloat32(val *float32) *NullableFloat32 {
+ return &NullableFloat32{value: val, isSet: true}
+}
+
+func (v NullableFloat32) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableFloat32) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableFloat64 struct {
+ value *float64
+ isSet bool
+}
+
+func (v NullableFloat64) Get() *float64 {
+ return v.value
+}
+
+func (v *NullableFloat64) Set(val *float64) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableFloat64) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableFloat64) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableFloat64(val *float64) *NullableFloat64 {
+ return &NullableFloat64{value: val, isSet: true}
+}
+
+func (v NullableFloat64) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableFloat64) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableString struct {
+ value *string
+ isSet bool
+}
+
+func (v NullableString) Get() *string {
+ return v.value
+}
+
+func (v *NullableString) Set(val *string) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableString) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableString) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableString(val *string) *NullableString {
+ return &NullableString{value: val, isSet: true}
+}
+
+func (v NullableString) MarshalJSON() ([]byte, error) {
+ return json.Marshal(v.value)
+}
+
+func (v *NullableString) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type NullableTime struct {
+ value *time.Time
+ isSet bool
+}
+
+func (v NullableTime) Get() *time.Time {
+ return v.value
+}
+
+func (v *NullableTime) Set(val *time.Time) {
+ v.value = val
+ v.isSet = true
+}
+
+func (v NullableTime) IsSet() bool {
+ return v.isSet
+}
+
+func (v *NullableTime) Unset() {
+ v.value = nil
+ v.isSet = false
+}
+
+func NewNullableTime(val *time.Time) *NullableTime {
+ return &NullableTime{value: val, isSet: true}
+}
+
+func (v NullableTime) MarshalJSON() ([]byte, error) {
+ return v.value.MarshalJSON()
+}
+
+func (v *NullableTime) UnmarshalJSON(src []byte) error {
+ v.isSet = true
+ return json.Unmarshal(src, &v.value)
+}
+
+type MappedNullable interface {
+ ToMap() (map[string]interface{}, error)
+}
+
+// A wrapper for strict JSON decoding
+func newStrictDecoder(data []byte) *json.Decoder {
+ dec := json.NewDecoder(bytes.NewBuffer(data))
+ dec.DisallowUnknownFields()
+ return dec
+}
+
+// Prevent trying to import "fmt"
+func reportError(format string, a ...interface{}) error {
+ return fmt.Errorf(format, a...)
+}
+
+// IsNil checks if an input is nil
+func IsNil(i interface{}) bool {
+ if i == nil {
+ return true
+ }
+ switch reflect.TypeOf(i).Kind() {
+ case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice:
+ return reflect.ValueOf(i).IsNil()
+ case reflect.Array:
+ return reflect.ValueOf(i).IsZero()
+ }
+ return false
+}
+
+func IsZero(v interface{}) bool {
+ return reflect.ValueOf(v).IsZero()
+}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 142f8e66bd..c25a58e334 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -111,6 +111,9 @@ github.com/ionos-cloud/sdk-go-bundle/products/logging/v2
# github.com/ionos-cloud/sdk-go-bundle/products/monitoring/v2 v2.0.2
## explicit; go 1.24
github.com/ionos-cloud/sdk-go-bundle/products/monitoring/v2
+# github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2 v2.0.3
+## explicit; go 1.24
+github.com/ionos-cloud/sdk-go-bundle/products/objectstorage/v2
# github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2 v2.0.3
## explicit; go 1.22
github.com/ionos-cloud/sdk-go-bundle/products/vpn/v2